Description Usage Arguments Value Examples
View source: R/LinearModelL1.R
minimizes the following cost function: 1/n ∑i=1^n L[w^T x_i + b, y_i] + penalty * ||w||_1
1 2 3 4 5 6 7 8 | LinearModelL1(
X.scaled.mat,
y.vec,
penalty,
opt.thresh,
initial.weight.vec,
step.size
)
|
X.scaled.mat |
the scaled training matrix [ n_observations : n_features ] |
y.vec |
the label vector for the data matrix [ n_observations : 1 ] |
penalty |
a positive scaler penalty term |
opt.thresh |
a positive scaler |
initial.weight.vec |
a starting weight vector, can be random numbers or 0s [ n_features : 1 ] |
step.size |
the incrimental step to descent with |
an optimal weight vector for predictings [n_features + 1 : 1] where the first entry is the intercept term
1 2 | # load the default dataset
getwd()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.