Usage
"predict"(object, newx, which.model, s = NULL, type = c("link", "response", "coefficients", "nonzero", "class"), exact = FALSE,
...)
Arguments
object
The "relaxnet"
object from which to get predictions.
newx
Matrix of new values for x
at which predictions are to be made. Must be a matrix; can be sparse as in Matrix
package. This argument is not used for type=c("coefficients","nonzero")
which.model
Specifies the submodel from which predictions are required. "main"
indicates the main glmnet model, while an integer indicates one of the relaxed models.
s
Value(s) of the penalty parameter lambda
at which predictions are required. Default is the entire sequence of lambda values for the model specified by which.model
.
type
See link[glmnet]{predict.glmnet}
.
exact
Only the default, FALSE
, is supported. See link[glmnet]{predict.glmnet}
.
...
Further arguments passed to predict.glmnet
. In the current version, these are not guaranteed to work correctly (for example, offset
has not yet been implemented for relaxnet).