Scikit-Learn
43
array([0.49999993, 0.49999993])
LASSO (Least Absolute Shrinkage and Selection Operator)
LASSO is the regularisation technique that performs L1 regularisation. It modifies the loss
function by adding the penalty (shrinkage quantity) equivalent to the summation of the
absolute value of coefficients.
∑ (𝑌
𝑖
− 𝑊
0
− ∑ 𝑊
𝑖
𝑋
𝑗𝑖
𝑛
𝑖=1
)
2
+
𝑚
𝑗=1
𝛼 ∑|𝑊
𝑖
|
𝑛
𝑖=1
= 𝑙𝑜𝑠𝑠_𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛 + 𝛼 ∑|𝑊
𝑖
|
𝑛
𝑖=1
sklearn.linear_model.
Lasso is a linear model, with an added regularisation term, used
to estimate sparse coefficients.
Parameters
Followings table consist
the parameters used by
Lasso
module:
Parameter
Description
alpha
: float, optional, default = 1.0
Alpha, the constant that multiplies the L1 term, is
the tuning parameter that decides how much we
want to penalize the model.
The default value is
1.0.
fit_intercept
:
Boolean,
optional.
Default=True
This parameter specifies that a constant (bias or
intercept) should
be added to the decision
function. No intercept will be used in calculation, if
it will set to false.
tol
: float, optional
This parameter represents
the tolerance for the
optimization. The
tol
value and updates would be
compared and if found updates smaller than
Dostları ilə paylaş: