ker.score.cv | R Documentation |
Function to perform cross-validation for a single class with a kernel-based score method
ker.score.cv(RW, ind.pos, m = 5, init.seed = NULL, fun = KNN.score, ...)
RW |
matrix. It can be a kernel matrix or the adjacency matrix of a graph |
ind.pos |
indices of the positive examples. They are the row indices of RW corresponding to positive examples. |
m |
number of folds (def: 5) |
init.seed |
initial seed for the random generator to generate folds. If NULL (default) no initialization is performed |
fun |
function. It must be a kernel-based score method (default KNN.score) |
... |
optional arguments for the function fun |
It performs a cross-validation using RANKS to predict the cross-validated scores. The cross-validation is stratified: the folds are constructed separately for each class, to maintain an equal ratio between classes among folds.
a numeric vector with the scores computed for each example
multiple.ker.score.cv
, multiple.ker.score.thresh.cv
, rw.kernel-methods
, Kernel functions
.
# Nodel label ranking of the DrugBank category Penicillins # on the Tanimoto chemical structure similarity network (1253 drugs) # using 5 fold cross-validation # and eav-score with 1-step random walk kernel library(bionetdata); data(DD.chem.data); data(DrugBank.Cat); labels <- DrugBank.Cat[,"Penicillins"]; ind.pos <- which(labels==1); K <- rw.kernel(DD.chem.data); res <- ker.score.cv(K, ind.pos, m = 5, init.seed = NULL, fun = eav.score);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.