Skip to content

Huber fix with bool X - #13328

Merged
agramfort merged 5 commits into
scikit-learn:masterfrom
agramfort:huber_bool
Mar 3, 2019
Merged

agramfort merged 5 commits into
scikit-learn:masterfrom
agramfort:huber_bool

Conversation

@agramfort

Copy link
Copy Markdown
Member

fixes #13314

# 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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
huber = HuberRegressor().fit(X_bool, y)
HuberRegressor().fit(X_bool, y)

@albertcthomas albertcthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM but you need to rebase.

@NicolasHug NicolasHug left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM otherwise

Comment thread doc/whats_new/v0.21.rst Outdated

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should be PR number 13328

Comment thread doc/whats_new/v0.21.rst Outdated
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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

revert?

@agramfort
agramfort merged commit 0e9520b into scikit-learn:master Mar 3, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
* make sure huber works with boolean X

* update what's new

* lint

* review

* pep8
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
koenvandevelde pushed a commit to koenvandevelde/scikit-learn that referenced this pull request Jul 12, 2019
* make sure huber works with boolean X

* update what's new

* lint

* review

* pep8
davidgegiya added a commit to davidgegiya/agent-orchestrator that referenced this pull request Nov 9, 2026
…rRegressor fit

Pin 37b0e66c871e8fb032a9c7086b2a1d5419838154 and its regression selectors for reproducible runs.

Source: scikit-learn/scikit-learn#13328
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.

TypeError when supplying a boolean X to HuberRegressor fit

4 participants