
cv.biglasso(X, y, row.idx = 1:nrow(X), eval.metric = c("default", "MAPE"), ncores = parallel::detectCores(), ..., nfolds = 5, seed, cv.ind, trace = FALSE)
biglasso
.biglasso
.X
that used for fitting
the model. as in biglasso
.lambda
. "default" for linear regression is MSE (mean squared error), for logistic regression is misclassification error. "MAPE", for linear regression only, is the Mean Absolute Percentage Error.parallel
package. (This is different from ncores
in biglasso
, which is the number of OpenMP threads.)biglasso
.cv.biglasso
."cv.biglasso"
which inherits from class "cv.ncvreg"
.
The following variables are contained in the class (adopted from cv.ncvreg
).biglasso
nfolds
times, each time
leaving out 1/nfolds
of the data. The cross-validation
error is based on the residual sum of squares when
family="gaussian"
and the binomial deviance when
family="binomial"
.
The S3 class object cv.biglasso
inherits class cv.ncvreg
.
So S3 functions such as "summary", "plot"
can be directly applied to the
cv.biglasso
object.
biglasso
, plot.cv.biglasso
, summary.cv.biglasso
, setupX
## cv.biglasso
data(colon)
X <- colon$X
y <- colon$y
X.bm <- as.big.matrix(X)
## logistic regression
cvfit <- cv.biglasso(X.bm, y, family = 'binomial', seed = 1234, ncores = 2)
par(mfrow = c(2, 2))
plot(cvfit, type = 'all')
summary(cvfit)
Run the code above in your browser using DataLab