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

Skip to content

Conversation

@agramfort
Copy link
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
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)

Copy link
Contributor

@albertcthomas albertcthomas left a comment

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.

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

LGTM otherwise


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

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