8000 Test CI by jrbourbeau · Pull Request #873 · dask/dask-ml · GitHub
[go: up one dir, main page]

Skip to content

Test CI #873

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

Closed
wants to merge 2 commits into from
Closed

Test CI #873

wants to merge 2 commits into from

Conversation

jrbourbeau
Copy link
Member

As title

@VibhuJawa
Copy link
Collaborator

This failure is because of this change in sckit-learn 1.01 scikit-learn/scikit-learn#21389.

Previously sklearn kept feature-names even if we called fit again on a numpy array. PR scikit-learn/scikit-learn#21389. fixed that.

See below:

In sckit-learn=1.0.0:

>>> import numpy as np
>>> import pandas as pd
>>> from sklearn.preprocessing import StandardScaler
>>> 
>>> est = StandardScaler()
>>> est.fit(X=pd.DataFrame({'a':[0,1],'b':[2,3]}))
StandardScaler()
>>> est.fit(X=np.asarray([[0,1],[2,3]]))
StandardScaler()
>>> 
>>> print(est.feature_names_in_)
['a' 'b']

In sckit-learn=1.0.1 after PR 21389 :

>>> import numpy as np
>>> import pandas as pd
>>> from sklearn.preprocessing import StandardScaler
>>> 
>>> est = StandardScaler()
>>> est.fit(X=pd.DataFrame({'a':[0,1],'b':[2,3]}))
StandardScaler()
>>> est.fit(X=np.asarray([[0,1],[2,3]]))
StandardScaler()
>>> 
>>> print(est.feature_names_in_)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'StandardScaler' object has no attribute 'feature_names_in_'

@jrbourbeau
Copy link
Member Author

Thanks for investigating @VibhuJawa. Closing this PR in favor of #872

@jrbourbeau jrbourbeau closed this Nov 1, 2021
@jrbourbeau jrbourbeau deleted the test-co branch November 1, 2021 19:15
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.

2 participants
0