predict.cv.sparsenet: make predictions from a "cv.sparsenet" object.
Description
This function makes predictions from a cross-validated sparsenet model,
using the stored "sparsenet.fit" object, and the optimal value
chosen for lambda.
Usage
# S3 method for cv.sparsenet
predict(object, newx, which=c("parms.min","parms.1se"),...)
# S3 method for cv.sparsenet
coef(object, which=c("parms.min","parms.1se"),...)
Value
The object returned depends the ... argument which is passed on
to the predict method for sparsenet objects.
Arguments
object
Fitted "cv.sparsenet" object.
newx
Matrix of new values for x at which predictions are
to be made. Must be a matrix. See documentation for predict.sparsenet.
which
Either the paramaters of the minimum of the CV curves
(default "parms.min" or the parameters corresponding to the
one standard-error rule parms.1se)
...
Not used. Other arguments to predict.
Author
Rahul Mazumder, Jerome Friedman and Trevor Hastie
Maintainer: Trevor Hastie <hastie@stanford.edu>
Details
This function makes it easier to use the results of
cross-validation to make a prediction.