Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not able to import PolynomialFeatures, make_pipeline in Scikit-learn

Tags:

scikit-learn

I'm not able to import the following modules in an ipython notebook:

from sklearn.preprocessing import PolynomialFeatures

from sklearn.pipeline import make_pipeline

The following error pops up

ImportError: cannot import name PolynomialFeatures

The same error also appears for make_pipeline.

I'm a newbie in scikit-learn, please help out.

I'm using the miniconda installation of python and the version number for scikit-learn is 0.14.1.

like image 349
user40465 Avatar asked Oct 12 '25 05:10

user40465


1 Answers

Polynomial Features is included for next version of scikit-learn and is not available in 0.14.1. Please update to 0.15-git if you want to use it. The same holds for make pipeline.

To get the bleeding edge version:

git clone git://github.com/scikit-learn/scikit-learn.git

python setup.py build_ext --inplace

Please read: http://scikit-learn.org/stable/developers/index.html#git-repo

like image 80
Abhishek Thakur Avatar answered Oct 16 '25 06:10

Abhishek Thakur



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!