-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
[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
[MRG] Minor doc fixes to coordinate_descent.py #11737
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For docstrings, we value readability in plain text. I much prefer what we have there.
I think the numpydoc spec says something similar |
Oh OK, I wasn't aware of that. May I still suggest the following changes?
|
Yes, thanks
|
this has been discussed in the past. Using non-latex in docstring (not narrative doc) I would not change this. my 2c |
This reverts commit ea05a61.
Removed pseudo latex notation and fixed Fro norm indication
I just committed the above proposed changes and changes this PR's title. |
@@ -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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Reference Issues/PRs
What does this implement/fix? Explain your changes.
Minor doc changes to use latex instead of plain text math equations.Minor doc changes to remove latex in docstrings + small fix for Frobenius norm index
Any other comments?