Currently (2020/03/03), elementary, junior high and high schools are closed due to the spread of COVID-19 infection, and all the teaching materials of N preparatory school are open to the public for free. It is said that I am also working on "Introduction to Machine Learning", but a little trouble occurred in "12. How to handle missing values".
error
ImportError: cannot import name 'Imputer' from 'sklearn.preprocessing'
The version of scikit-learn
that I use is 0.22.2
, but it seems that sklearn.preprocessing.Imputer
is not supported in this version.
https://scikit-learn.org/stable/modules/classes.html?highlight=sklearn%20preprocessing#module-sklearn.preprocessing
I searched for a solution.
https://scikit-learn.org/stable/modules/impute.html
from sklearn.impute import SimpleImputer
It seems that you should use.
Recommended Posts