Lasso {TraceAssist} | R Documentation |
Fit a logistic probability model based on Lasso penalty
Lasso(xvec,y,xnew,lambda)
xvec |
An input matrix. Each row is a vectorized predictor. |
y |
Binary response variable. |
xnew |
New predictors in the test data. Organized as a matrix with each row being a data point. |
lambda |
The regularization penalty. |
The returned object is a list of components.
B_est
- The estimated coefficient vector of linear predictor.
prob
- The predicted probabilities for the test data.