8000 [MRG] DOC document default values for Lars by qdeffense · Pull Request #14512 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

[MRG] DOC document default values for Lars #14512

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 10 commits into from
Aug 15, 2019

Conversation

qdeffense
Copy link
Contributor
@qdeffense qdeffense commented Jul 29, 2019

Reference Issues/PRs

Partially addresses #14452 and #14404

What does this implement/fix? Explain your changes.

document default values for Lars, LassoLars, LarsCV, LassoLarsCV and LassoLarsIC

@glemaitre
Copy link
Member

@qdeffense I might advise waiting a resolution regarding the standard that we would like to follow regarding the docstring formatting. We might not review this PR before having made a choice in #12356. You will need to be patient then :)

@glemaitre glemaitre changed the title document default values for Lars [WIP] DOC document default values for Lars Jul 30, 2019
Input targets.

Xy : array-like shape=(n_samples,) or (n_samples, n_targets), default=None
Xy : array-like of shape (n_samples,) or (n_samples, n_targets), default=None
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

ok seems like we're going with "of shape" now.

@amueller
Copy link
Member

linting fails still

Copy link
Member
@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

A few comments but mostly looks good, thanks for the PR @qdeffense

Whether to use a precomputed Gram matrix to speed up
calculations. If set to ``'auto'`` let us decide. The Gram matrix
cannot be passed as argument since we will use only subsets of X.

cv : int, cross-validation generator or an iterable, optional
cv : int, cross-validation generator or an iterable, default='warn'
Copy link
Member

Choose a reason for hiding this comment

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

Default is None, same in other place

Maximum number of iterations to perform.

eps : float, optional
eps : float, default=np.finfo(np.float).eps
Copy link
Member

Choose a reason for hiding this comment

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

I think this is one of the few cases where we could describe the default in the description instead.

E.g.

eps : float, optional
    [...]. By default, ``np.finfo(np.float).eps`` is used

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@NicolasHug and use optional ?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, since the default isn't mentioned on the first line I think it's worth clarifying that the parameter is still optional

@@ -358,17 +361,17 @@ def _lars_path_solver(X, y, Xy=None, Gram=None, n_samples=None, max_iter=500,
solution of the coordinate descent lasso_path function.

Returns
-------
alphas : array, shape (n_alphas + 1,)
--------
Copy link
Member

Choose a reason for hiding this comment

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

revert?

Copy link
Member
@amueller amueller left a comment

Choose a reason for hiding this comment

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

lgtm

@amueller amueller changed the title [WIP] DOC document default values for Lars [MRG] DOC document default values for Lars Aug 14, 2019
@NicolasHug NicolasHug merged commit 2157880 into scikit-learn:master Aug 15, 2019
@NicolasHug
Copy link
Member

Thanks @qdeffense !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0