ibex icon indicating copy to clipboard operation
ibex copied to clipboard

import ibex.sklearn.preprocessing get warnings, but import sklearn.preprocessing won't

Open HereticSK opened this issue 6 years ago • 0 comments

ibex version: 0.1.0 sklearn version 0.20.2

When I run import ibex.sklearn.preprocessing, I get

C:\Users\Cosmo.virtualenvs\intra-day-factor-Yh93l3eB\lib\site-packages\sklearn\utils\deprecation.py:58: DeprecationWarning: Class Imputer is deprecated; Imputer was deprecated in version 0.20 and will be removed in 0.22. Import impute.SimpleImputer from sklearn instead. warnings.warn(msg, category=DeprecationWarning) C:\Users\Cosmo.virtualenvs\intra-day-factor-Yh93l3eB\lib\site-packages\sklearn\utils\deprecation.py:58: DeprecationWarning: Class Imputer is deprecated; Imputer was deprecated in version 0.20 and will be removed in 0.22. Import impute.SimpleImputer from sklearn instead. warnings.warn(msg, category=DeprecationWarning) C:\Users\Cosmo.virtualenvs\intra-day-factor-Yh93l3eB\lib\site-packages\sklearn\utils\deprecation.py:58: DeprecationWarning: Class Imputer is deprecated; Imputer was deprecated in version 0.20 and will be removed in 0.22. Import impute.SimpleImputer from sklearn instead. warnings.warn(msg, category=DeprecationWarning) C:\Users\Cosmo.virtualenvs\intra-day-factor-Yh93l3eB\lib\site-packages\sklearn\preprocessing\data.py:323: DataConversionWarning: Data with input dtype int64 were all converted to float64 by MinMaxScaler. return self.partial_fit(X, y) C:\Users\Cosmo.virtualenvs\intra-day-factor-Yh93l3eB\lib\site-packages\sklearn\preprocessing\data.py:323: DataConversionWarning: Data with input dtype int64 were all converted to float64 by MinMaxScaler. return self.partial_fit(X, y) C:\Users\Cosmo.virtualenvs\intra-day-factor-Yh93l3eB\lib\site-packages\sklearn\preprocessing_encoders.py:368: FutureWarning: The handling of integer data will change in version 0.22. Currently, the categories are determined based on the range [0, max(values)], while in the future they will be determined based on the unique values. If you want the future behaviour and silence this warning, you can specify "categories='auto'". In case you used a LabelEncoder before this OneHotEncoder to convert the categories to integers, then you can now use the OneHotEncoder directly. warnings.warn(msg, FutureWarning) C:\Users\Cosmo.virtualenvs\intra-day-factor-Yh93l3eB\lib\site-packages\sklearn\preprocessing_encoders.py:368: FutureWarning: The handling of integer data will change in version 0.22. Currently, the categories are determined based on the range [0, max(values)], while in the future they will be determined based on the unique values. If you want the future behaviour and silence this warning, you can specify "categories='auto'". In case you used a LabelEncoder before this OneHotEncoder to convert the categories to integers, then you can now use the OneHotEncoder directly. warnings.warn(msg, FutureWarning) C:\Users\Cosmo.virtualenvs\intra-day-factor-Yh93l3eB\lib\site-packages\sklearn\preprocessing\data.py:625: DataConversionWarning: Data with input dtype int64 were all converted to float64 by StandardScaler. return self.partial_fit(X, y) C:\Users\Cosmo.virtualenvs\intra-day-factor-Yh93l3eB\lib\site-packages\sklearn\preprocessing\data.py:625: DataConversionWarning: Data with input dtype int64 were all converted to float64 by StandardScaler. return self.partial_fit(X, y)

Strangely, however, import sklearn.preprocessing gives no warnings.

Since the warnings mention Imputer and OneHotEncoder. I I also tried import them from pure sklearn, but still got no warnings.

I guess the reason is that ibex imports some deprecated classes from sklearn. But I cannot figure out which part triggers those warnings, and why warnings only occur when they are imported by ibex.

This may not affect the core functionality of ibex, except a bit annoying. But the auto-generating mechanism interests me so I hope to dig deeper into it anyway. Thanks.

HereticSK avatar Feb 13 '19 06:02 HereticSK