Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[MRG] DOC FIX: multi-target linear model attribute shapes #1584

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

Closed
wants to merge 1 commit into from

Conversation

vene
Copy link
Member

@vene vene commented Jan 15, 2013

I have two concerns.

  • The ElasticNetCV and derivated classes only select one point in hyperparameter space. It's not documented, and honestly I don't know at the moment how this point is selected when y is multi-target. I would expect it to be the overall best one over all targets.
  • The least_angle based classes do not document the alphas_, active_ and coef_path_ parameters, and as they are they can't be easily documented. Even the lars_path function misdocuments them as being shaped after max_features which is not true in the case of early stopping or especially in the case of lasso where features can be removed.

I might not have time to do this the following few days but if nobody else can spare the time and it's holding back the release please ping me to do it.

@@ -440,15 +440,16 @@ class Lars(LinearModel, RegressorMixin):

Attributes
----------
`coef_path_` : array, shape = [n_features, n_alpha]
`coef_path_` : array, shape = [n_features, n_alpha] | list of \
n_targets such arrays
Copy link
Member

Choose a reason for hiding this comment

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

more than 80c are allowed in docstrings AFAIK. I've never seen a \ before in a docstring

Copy link
Member

Choose a reason for hiding this comment

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

Yeah pep8 doesn't mind that i think.. also because address links in docstrings are super long sometimes and you can't really split them, so docstrings they can be long AFAIK

@agramfort
Copy link
Member

thanks for doing this. No time for me before next week ... or later :(

@amueller
Copy link
Member

Thanks for working on this. I'll try to find time to review it soon. Hopefully @GaelVaroquaux can give some more qualified feedback on the weekend.

@amueller
Copy link
Member

I think this is related: #1615

@amueller
Copy link
Member

amueller commented Feb 4, 2013

Any news?

@larsmans
Copy link
Member

Is anything holding back the merge of this PR?

@vene
Copy link
Member Author

vene commented Mar 17, 2013

I guess its incompleteness based on the two concerns in my original post. I can adress the second one easily.

@larsmans
Copy link
Member

If you fix that, +1 for merging. We can open a new issue for the second concern.

@vene
Copy link
Member Author

vene commented Mar 17, 2013

My thoughts exactly.

@larsmans
Copy link
Member

Ok, feel free to merge when you're done with (1).

@agramfort
Copy link
Member

does ElasticNetCV behave correctly with multi target Y ? I am not sure we should support it since all alphas will be different and the computation is likely to be as fast as when run for each target independently.

@vene
Copy link
Member Author

vene commented Mar 17, 2013

@agramfort: I'm not sure what correct behaviour is, here. The fact that it doesn't crash is due to inheritance. I fear that due to the loop over targets, each consecutive alpha would override the previous. I have not investigated this, though.

Even if the alpha is the one that's best overall, I am still not sure whether this should be called correct behaviour, as opposed to a list of n_targets alphas. This uncertainty is what prevented me from diving deeper into this issue.

DOC fixes and standardization in least_angle docstrings

More standardization in linear model docs
@vene
Copy link
Member Author

vene commented Mar 19, 2013

I squashed and now there's just one commit to bring into master (though it cannot be done with the green button apparently). However I'm waiting for some consistency discussion that I started on the list.

@vene
Copy link
Member Author

vene commented Mar 19, 2013

Merged by rebase.

@vene vene closed this Mar 19, 2013
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.

5 participants