Skip to content
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

Huber fix with bool X #13328

Merged
merged 5 commits into from Mar 3, 2019

Conversation

4 participants
@agramfort
Copy link
Member

agramfort commented Feb 28, 2019

fixes #13314

@agramfort agramfort force-pushed the agramfort:huber_bool branch from 8dbc60e to 8838ca1 Feb 28, 2019

@agramfort agramfort added this to In progress in Sprint Paris 2019 Feb 28, 2019

# Test that it does not crash with bool data
X, y = make_regression(n_samples=200, n_features=2, noise=4.0, random_state=0)
X_bool = X > 0
huber = HuberRegressor().fit(X_bool, y)

This comment has been minimized.

@glemaitre

glemaitre Feb 28, 2019

Contributor
Suggested change
huber = HuberRegressor().fit(X_bool, y)
HuberRegressor().fit(X_bool, y)
@albertcthomas
Copy link
Contributor

albertcthomas left a comment

LGTM but you need to rebase.

@agramfort agramfort force-pushed the agramfort:huber_bool branch from 02b72ad to f0f8e9f Mar 1, 2019

@NicolasHug
Copy link
Contributor

NicolasHug left a comment

LGTM otherwise

@@ -230,6 +230,10 @@ Support for Python 3.4 and below has been officially dropped.
in version 0.21 and will be removed in version 0.23.
:issue:`12821` by :user:`Nicolas Hug <NicolasHug>`.

- |Fix| Fixed a bug in :class:`linear_model.HuberRegressor` that was
broken when X was of dtype bool.
:issue:`13314` by `Alexandre Gramfort`_.

This comment has been minimized.

@NicolasHug

NicolasHug Mar 1, 2019

Contributor

Should be PR number 13328

@@ -42,7 +42,7 @@ Support for Python 3.4 and below has been officially dropped.
See version doc/whats_new/v0.20.rst for structure. Entries should be
prefixed with one of the labels: |MajorFeature|, |Feature|, |Efficiency|,
|Enhancement|, |Fix| or |API|. They should be under a heading for the
relevant module (or *Multiple Modules* or *Miscellaneous*), and within each
relevant module (or *Mufltiple Modules* or *Miscellaneous*), and within each

This comment has been minimized.

@NicolasHug

NicolasHug Mar 1, 2019

Contributor

revert?

@agramfort agramfort force-pushed the agramfort:huber_bool branch from 1f1eae1 to 07d1ac5 Mar 2, 2019

@agramfort agramfort merged commit 0e9520b into scikit-learn:master Mar 3, 2019

9 checks passed

LGTM analysis: C/C++ No code changes detected
Details
LGTM analysis: JavaScript No code changes detected
Details
LGTM analysis: Python No new or fixed alerts
Details
ci/circleci: deploy Your tests passed on CircleCI!
Details
ci/circleci: doc Your tests passed on CircleCI!
Details
ci/circleci: doc-min-dependencies Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
codecov/patch 100% of diff hit (target 92.37%)
Details
codecov/project 92.37% (+<.01%) compared to 37b0e66
Details

Sprint Paris 2019 automation moved this from In progress to Done Mar 3, 2019

Kiku-git added a commit to Kiku-git/scikit-learn that referenced this pull request Mar 4, 2019

Huber fix with bool X (scikit-learn#13328)
* make sure huber works with boolean X

* update what's new

* lint

* review

* pep8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.