Description Usage Arguments Value Author(s) See Also
Similar to other predict methods, this functions predicts fitted values, logits, coefficients and more from a fitted "cv.relaxnet"
or "cv.alpha.relaxnet"
object. By default, predictions are made at those values of the tuning parameters which "won" the cross-validation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## S3 method for class 'cv.relaxnet'
predict(object,
newx,
which.model = object$which.model.min,
s = object$overall.lambda.min,
type = c("link", "response", "coefficients", "nonzero", "class"),
exact = FALSE,
...)
## S3 method for class 'cv.alpha.relaxnet'
predict(object,
newx,
alpha.val = object$which.alpha.min,
type = c("link", "response", "coefficients", "nonzero", "class"),
...)
|
object |
The object from which predictions are to be made. |
newx |
Matrix of new values for |
alpha.val |
Value of alpha at which predictions are to be made. Default is to use that value which "won" the cross-validation. |
which.model |
Specifies the submodel from which predictions are required. |
s |
Value(s) of the penalty parameter |
type |
See |
exact |
Only the default, |
... |
Further arguments passed to predict.relaxnet or to predict.cv.relaxnet (for the alpha version). |
The object returned depends on type.
Stephan Ritter, with design contributions from Alan Hubbard.
Much of the code (and some help file content) is adapted from the glmnet package, whose authors are Jerome Friedman, Trevor Hastie and Rob Tibshirani.
relaxnet
, cv.relaxnet
, cv.alpha.relaxnet
, predict.relaxnet
, predict.glmnet
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.