8000 [MRG] Minor doc fixes to coordinate_descent.py by NicolasHug · Pull Request #11737 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

[MRG] Minor doc fixes to coordinate_descent.py #11737

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 7, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sklearn/linear_model/coordinate_descent.py
Original file line number Diff line number Diff line change
Expand Up @@ -1612,13 +1612,13 @@ class MultiTaskElasticNet(Lasso):

The optimization objective for MultiTaskElasticNet is::

(1 / (2 * n_samples)) * ||Y - XW||^Fro_2
(1 / (2 * n_samples)) * ||Y - XW||_Fro^2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for this one, I think it's an error

+ alpha * l1_ratio * ||W||_21
+ 0.5 * alpha * (1 - l1_ratio) * ||W||_Fro^2

Where::

||W||_21 = \\sum_i \\sqrt{\\sum_j w_{ij}^2}
||W||_21 = sum_i sqrt(sum_j w_ij ^ 2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe -1 for this one. It seems not friendly to latex users. More importantly, it's not consistent with other parts of the doc (e.g., MultiTaskLasso).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comments above suggest that docstrings should not contain any latex.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I won't be too strict on these minor issues.


i.e. the sum of norm of each row.

Expand Down
0