Description Usage Arguments Details Value Examples
View source: R/graph.utility.R
Create a data frame for stratified cross-validation.
1 | create.stratified.fold.df(labels, scores, folds = 5, seed = 23)
|
labels |
vector of the true labels (0 negative, 1 positive). |
scores |
a numeric vector of the values of the predicted labels. |
folds |
number of folds of the cross validation ( |
seed |
initialization seed for the random generator to create folds ( |
the folds are stratified, i.e. contain the same amount of positive and negative examples.
a data frame with three columns:
scores
: contains the predicted scores;
labels
: contains the labels as pos
or neg
;
folds
: contains the index of the fold in which the example falls.
The index can range from 1 to the number of folds.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.