multiple.RW.cv {RANKS}R Documentation

Random walk, GBA and labelprop multiple cross-validation for a single class

Description

Function to execute multiple cross-validation with random walk based, labelprop and GBA methods

Usage

multiple.RW.cv(W, ind.pos, k = 5, p = 100, init.seed = 0, fun = RW, ...)

Arguments

W

a numeric matrix representing the adjacency matrix of the graph. Note that if the optional argument norm=TRUE (def.), the W matrix is normalized, otherwise it is assumed that W is just normalized

ind.pos

indices of the "core" positive examples of the graph. They represent the indices of W corresponding to the positive examples

k

number of folds (def: 5)

p

number of repeated cross-validations

init.seed

initial seed for the random generator. If 0 (default) no initialization is performed

fun

function. It must be one of the following functions:

- RW (default)

- RWR

- label.prop

- GBAsum

- GBAmax

...

optional arguments for the function fun:

- gamma : restart parameter (def: 0.6) (meaningful only for RWR)

- tmax : maximum number of iterations (def: 1000)

- eps : maximum allowed difference between the computed probabilities at the steady state (def. 1e-10)

Details

Function to execute multiple cross-validation with random walk based, labelprop and GBA methods for a single class. It computes the scores by averaging across multiple cross validations. It can be used with of the following methods: RW, RWR, label.prop, GBAsum, GBAmax.

Value

a vector with the the probabilities for each example at the steady state averaged across multiple cross-validations

See Also

RW, RWR, label.prop, GBAsum, GBAmax, RW.cv

Examples

# Nodel label ranking of the DrugBank category Penicillins
# on the Tanimoto chemical structure similarity network (1253 drugs)
# using 5 fold cross-validation repeated 2 times
# and "vanilla" 2-step random walk
library(bionetdata);
data(DD.chem.data);
data(DrugBank.Cat);
labels <- DrugBank.Cat[,"Penicillins"];
ind.pos <- which(labels==1);

res <- multiple.RW.cv(DD.chem.data, ind.pos, k = 5, p = 2, init.seed = 0, fun = GBAmax)


# the same but using the label.prop
res <- multiple.RW.cv(DD.chem.data, ind.pos, k = 5, p = 2, init.seed = 0, fun = label.prop, tmax=2)

# the same but using "vanilla" 2-step random walk
res <- multiple.RW.cv(DD.chem.data, ind.pos, k = 5, p = 2, init.seed = 0, fun = RW, tmax=2)



[Package RANKS version 1.1 Index]