oscar.cv.visu | R Documentation |
This function plots the model performance as a function of cardinality for k-fold cross-validation. Performance metric depends on user choice and model family (i.e. lower MSE is good, higher C-index is good).
oscar.cv.visu(
cv,
add = FALSE,
main = "OSCAR cross-validation",
xlab = "Cardinality 'k'",
ylab = "CV performance",
...
)
cv |
Matrix produced by oscar.cv; rows are cv-folds, cols are k-values |
add |
Should plot be added on top of an existing plot device |
main |
Main title |
xlab |
X-axis label |
ylab |
Y-axis label |
... |
Additional parameters passed on top the CV points |
This is a plotting function that does not return anything, but instead draws on an existing or a new graphics device.
if(interactive()){
data(ex)
fit <- oscar(x=ex_X, y=ex_Y, k=ex_K, w=ex_c, family='cox')
fit_cv <- oscar.cv(fit, fold = 10, seed = 123)
oscar.cv.visu(fit_cv)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.