-
Notifications
You must be signed in to change notification settings - Fork 43
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
Robust Classification, Regression and Clustering. #70
Conversation
…ustering. Update doc, test, examples. Fix typo
Thanks @TimotheeMathieu and sorry for slow review. I'll do a pass now. If you don't mind I will merge upstream/master in, which should resolve the CI issues.. |
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.
Thanks @TimotheeMathieu ! This is a nice improvement, and the split of RobustWeightedEstimator
into separate regressor, classifier, and clusterer classes, makes indeed them easier to understand. We can easily do that since the added RobustWeightedEstimator
was not yet par of a release.
I have a few comments below. Also it would be good to makes sure following parts are run in unit tests (either by adding new tests or extending existing tests to cover them e.g. using pytest.mark.parametrize
)
weighting='mom'
andk=None
- check that classifier with another loss than log raises an error
def test_robust_no_proba(): ... est = RobustWeightedClassifier(loss='hinge').fit(X, y) msg = "Probability estimates are not available" with pytest.raises(AttributeError, match=msg): est.predict_proba(X)
Finally a few minor fixes of types: typos_diff.txt. Otherwise changes look good I think.
I followed your recommendations @rth, thank you for the review, thanks to you there is a better test coverage. |
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.
Thanks!
This update the robust module.
EDIT : I also added Huber loss because it is more robust than squared loss and it makes more sense in robust regression.