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

Skip to content

[MRG + 1] adding sample weights for BayesianRidge #10112

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 2 commits into from
Nov 13, 2017

Conversation

pstjohn
Copy link
Contributor

@pstjohn pstjohn commented Nov 11, 2017

This is a first stab at adding sample_weight as a kwarg to BayesianRidge.
Seems to work well, and matches the Ridge.fit() method.

fixes #10111

@agramfort
Copy link
Member

please update what's new

@jmschrei
Copy link
Member

Looks fairly straightforward to me as well. Thanks for the contribution!

@jnothman
Copy link
Member

Please add an entry to the change log at doc/whats_new/v0.20.rst. Like the other entries there, please reference thus pull request with :issue: and credit yourself (and other contributors if applicable) with :user:

sample_weight : numpy array of shape [n_samples]
Individual weights for each sample

.. versionadded:: 0.19.2
Copy link
Member

Choose a reason for hiding this comment

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

it will be 0.20 indeed

@codecov
Copy link

codecov bot commented Nov 13, 2017

Codecov Report

Merging #10112 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10112      +/-   ##
==========================================
+ Coverage    96.2%    96.2%   +<.01%     
==========================================
  Files         337      337              
  Lines       62817    62827      +10     
==========================================
+ Hits        60432    60442      +10     
  Misses       2385     2385
Impacted Files Coverage Δ
sklearn/linear_model/tests/test_bayes.py 90.42% <100%> (+0.89%) ⬆️
sklearn/linear_model/bayes.py 95.45% <100%> (+0.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4bead39...44f025a. Read the comment docs.

@pstjohn
Copy link
Contributor Author

pstjohn commented Nov 13, 2017

Thanks for the pointers on what's new!

@glemaitre glemaitre changed the title adding sample weights for BayesianRidge (fix #10111) [MRG + 1] adding sample weights for BayesianRidge (fix #10111) Nov 13, 2017
@glemaitre
Copy link
Member

LGTM

@glemaitre glemaitre changed the title [MRG + 1] adding sample weights for BayesianRidge (fix #10111) [MRG + 1] adding sample weights for BayesianRidge Nov 13, 2017
@jnothman jnothman merged commit c24a13e into scikit-learn:master Nov 13, 2017
@jnothman
Copy link
Member

Thanks

maskani-moh pushed a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
jwjohnson314 pushed a commit to jwjohnson314/scikit-learn that referenced this pull request Dec 18, 2017
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.

Add sample weights to BayesianRidge
5 participants