tpr.dag.holdout {HEMDAG} | R Documentation |
TPR-DAG holdout experiments
Description
Correct the computed scores in a hierarchy according to the selected TPR-DAG
ensemble variant by applying a classical holdout procedure.
Usage
tpr.dag.holdout(
S,
g,
ann,
testIndex,
norm = FALSE,
norm.type = NULL,
W = NULL,
parallel = FALSE,
ncores = 1,
positive = "children",
bottomup = "threshold",
topdown = "htd",
threshold = seq(from = 0.1, to = 0.9, by = 0.1),
weight = seq(from = 0.1, to = 0.9, by = 0.1),
kk = 5,
seed = 23,
metric = "auprc",
n.round = NULL
)
Arguments
S |
a named flat scores matrix with examples on rows and classes on columns. |
g |
a graph of class |
ann |
an annotation matrix: rows correspond to examples and columns to classes. |
testIndex |
a vector of integer numbers corresponding to the indexes of the elements (rows) of the scores matrix |
norm |
a boolean value. Should the flat score matrix be normalized? By default |
norm.type |
a string character. It can be one of the following values:
|
W |
vector of weight relative to a single example. If |
parallel |
a boolean value:
Use |
ncores |
number of cores to use for parallel execution. Set |
positive |
choice of the positive nodes to be considered in the bottom-up strategy. Can be one of the following values:
|
bottomup |
strategy to enhance the flat predictions by propagating the positive predictions from leaves to root. It can be one of the following values:
|
topdown |
strategy to make the scores hierarchy-consistent. It can be one of the following values: |
threshold |
range of threshold values to be tested in order to find the best threshold ( |
weight |
range of weight values to be tested in order to find the best weight ( |
kk |
number of folds of the cross validation ( |
seed |
initialization seed for the random generator to create folds ( |
metric |
a string character specifying the performance metric on which maximizing the parametric ensemble variant. It can be one of the following values:
|
n.round |
number of rounding digits (def. |
Details
The parametric hierarchical ensemble variants are cross-validated maximizing the parameter on the metric selected in metric
,
Value
A named matrix with the scores of the classes corrected according to the chosen TPR-DAG
ensemble algorithm.
Rows of the matrix are shrunk to testIndex
.
Examples
data(graph);
data(scores);
data(labels);
data(test.index);
S.tpr <- tpr.dag.holdout(S, g, ann=NULL, testIndex=test.index, norm=FALSE, norm.type=NULL,
positive="children", bottomup="threshold.free", topdown="gpav", W=NULL, parallel=FALSE,
ncores=1, threshold=0, weight=0, kk=NULL, seed=NULL, metric=NULL, n.round=NULL);