Issue
In sklearn's documentation, it says
The optimization objective for Lasso is:
(1 / (2 * n_samples)) * ||y - Xw||^2_2 + alpha * ||w||_1
I'm wondering if the shape of y
is (n_targets, n_features)
, what is the definition of ||w||_1
, where the shape of w
in this case would be (n_features, n_targets)
.
Solution
As you might see from code or docs, in such a case the norm of w
becomes its L_{2,1} norm. The euclidean norm of y - Xw
becomes the Frobenius norm of the corresponding matrix.
Answered By - amiola
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.