I'm having trouble parsing the help files for the predict()
function when using a glmnet()
-defined model. I don't see mention of an 's' argument anywhere. However, in the example code below, it appears to be a way to feed a regularization parameter (often labeled lambda).
y_lasso = predict(lasso, X, s = lambda)
What is the s
argument for, and where is it documented?
I have tried looking up help on predict
, glm.predict
, glm.SafePrediction
, with no luck.
I think you want the documentation for predict.glmnet
.
s - Value(s) of the penalty parameter lambda at which predictions are required. Default is the entire sequence used to create the model.