sirus.plot.cv | R Documentation |
Plot SIRUS cross-validation path: error and stability versus the number of rules when p0
varies.
sirus.plot.cv(sirus.cv.grid, p0.criterion = NULL, num.rule.max = 25)
sirus.cv.grid |
Cross-validation results returned by |
p0.criterion |
Criterion to pick the optimal |
num.rule.max |
Upper limit on the number of rules for the x-axis. Default is 25. |
Error is 1-AUC for classification and the unexplained variance for regression. Stability is the average proportion of rules shared by two SIRUS models fit on two distinct folds of the cross-validation.
Plots of cross-validation results.
|
plot of error vs number of rules (ggplot2 object). |
|
plot of stability vs number of rules (ggplot2 object). |
## load SIRUS require(sirus) ## prepare data data <- iris y <- rep(0, nrow(data)) y[data$Species == 'setosa'] = 1 data$Species <- NULL ## run cv cv.grid <- sirus.cv(data, y, nfold = 3, ncv = 2, num.trees = 100) ## plot cv result plot.error <- sirus.plot.cv(cv.grid)$error plot(plot.error)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.