multiple.ker.score.thresh.cv | R Documentation |
Function to execute multiple cross-validation and to find the optimal threshold with RANKS for a single class.
multiple.ker.score.thresh.cv(K, ind.pos, m = 5, p = 100, alpha = seq(from = 0.05, to = 0.6, by = 0.05), init.seed = 0, fun = KNN.score, ...)
K |
matrix. Kernel matrix or any valid symmetric matrix |
ind.pos |
indices of the positive examples. They are the row indices of RW corresponding to positive examples. |
m |
number of folds for each cross-validation |
p |
number of repeated cross-validations |
alpha |
vector of the quantiles to be tested |
init.seed |
initial seed for the random generator (def: 0) |
fun |
function. It must be a kernel-based score method (default KNN.score) |
... |
optional arguments for the function fun |
Function to execute multiple cross-validation with a kernel-based score method and to find the optimal threshold for a given class by internal cross-validation.
Scores are computed by averaging across multiple external cross-validations. The optimal quantile and corresponding threshold are selected by internal cross-validation using a specific metric (def: F-score).
A list with three components:
av.scores |
a vector with the average scores across multiple cross-validations. Elements of the vector av.scores correspond to the rows of RW |
opt.alpha |
the optimal quantile alpha |
opt.thresh |
the optimal threshold |
ker.score.cv
, multiple.ker.score.cv
, rw.kernel-methods
, Kernel functions
.
# Node label ranking and best threshold search for the DrugBank category Penicillins # on the Tanimoto chemical structure similarity network (1253 drugs) # using 5 fold cross-validation repeated 2 times # 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 <- multiple.ker.score.thresh.cv (K, ind.pos, m = 5, p = 2, init.seed = 0, fun = KNN.score);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.