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

Skip to content

Conversation

@imaculate
Copy link
Contributor

Resolved issue #6113 and #5871.
For estimators that used sample_weight parameter in the fit method, it was requested that similar should be applied to ransacRegressor. This has been intergrated.

@MechCoder
Copy link
Member

Please make sure no-one else is working on it, before issuing a pull request next time.

@MechCoder MechCoder changed the title Added sample_weight parameter to ransac.fit [MRG] Added sample_weight parameter to ransac.fit Jan 8, 2016
Copy link
Member

Choose a reason for hiding this comment

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

you can reuse has_fit_parameter from sklearn.utils.validation

@MechCoder
Copy link
Member

Can you add a test, testing this new feature?

…d raise an exception when sample_weight is passed to base_estimators that dont support it.
@imaculate
Copy link
Contributor Author

Thanks for the feedback @MechCoder ,
I have made more changes, Please check them out

Copy link
Member

Choose a reason for hiding this comment

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

you should document sample_weight as well

Copy link
Member

Choose a reason for hiding this comment

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

Also, can you remove this block and document it under sample_weight?, i.e

sample_weight: array-like, 
           blah, blah.. raises Error if balh blah

@imaculate
Copy link
Contributor Author

I have modified the tests as you suggested , they all passed. I'm still not sure about considering sample_weight when sampling ie subset_idxs

Copy link
Member

Choose a reason for hiding this comment

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

numpy array -> array-like

Also indent the next line just 4 spaces to the first line.
Look at how all the other parameters are documented

@MechCoder
Copy link
Member

@imaculate please run pep8 on both the files.

(just the above cosmetic comments and that's it from me)

@imaculate
Copy link
Contributor Author

Thanks .. Done!

Copy link
Member

Choose a reason for hiding this comment

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

just make this a comment starting with #

@MechCoder
Copy link
Member

lgtm.

cc: @TomDLT | @ahojnnes for the second review

@MechCoder MechCoder changed the title [MRG] Added sample_weight parameter to ransac.fit [MRG+1] Added sample_weight parameter to ransac.fit Jan 14, 2016
@imaculate
Copy link
Contributor Author

Done.

@ahojnnes
Copy link
Contributor

LGTM. Well Done.

@MechCoder
Copy link
Member

Merged as 41526cb (after updating whatsnew). Thanks 🍻 🍷 !!

@MechCoder MechCoder closed this Jan 14, 2016
@MechCoder
Copy link
Member

@ahojnnes Since you are now here, it would be great if you can give a second pass over #5497

@imaculate
Copy link
Contributor Author

Thanks @MechCoder @ahojnnes .First contribution! 🍻 .

@TomDLT
Copy link
Member

TomDLT commented Jan 14, 2016

🍻 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants