run.cv.spear
Run CV SPEAR on a given X and Y (stored under SPEARobject$data$train
)
Run CV SPEAR on a given X and Y (stored under SPEARobject$data$train
)
run.cv.spear(
fold.ids = NULL,
num.folds = NULL,
only.cross.Y = FALSE,
num.cores = NULL,
fold.id.method = "balanced",
parallel.method = NULL,
do.cv.eval = TRUE,
nlambda = 100,
calculate.factor.contributions = TRUE,
max_iter = 10000,
multinomial_loss = "deviance"
)
Argument |Description
------------- |----------------
fold.ids
| Assignment of folds for each subject. Must be a vector of length(N), where N = num.samples. Fold.ids must span from 1 - num.folds. Defaults to NULL
(randomly assigned)
num.folds
| Number of folds. How many folds to use? Defaults to 5.
num.cores
| How many cores to use for parallel processing? Defaults to parallel::detectCores()
fold.id.method
| How to generate fold.ids? See ?generate.fold.ids
for more information. Defaults to "balanced"
.
parallel.method
| Which parallel method to use? Can be "parLapply"
(defaults when NULL
), "mclapply"
, or "lapply"
(for single threaded processing).
do.cv.eval
| Whether or not to automatically run $cv.evaluate(...)
after constructing factors? Defaults to TRUE
nlambda
| For cv.evaluate(...)
. Number of lambdas (defaults to 100)
calculate.factor.contributions
| For cv.evaluate(...)
. Calculate factor contributions? When $params$family == "multinomial"
or "ordinal"
can save time to put FALSE
. Defaults to TRUE
.
max_iter
| For cv.evaluate(...)
. Maximum number of iterations (defaults to 10000)
multinomial_loss
| For cv.evaluate(...)
. Type of loss for when $params$family == "multinomial"
. Can be "deviance"
(default) or "misclassification"
only.cross.y
| In cross validation, only use the Y? Will use all of X for fitting even if Y is missing. Defaults to TRUE
SPEARobj <- make.SPEARobject(...)
SPEARobj$run.cv.spear()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.