[PYTHON] About sklearn.preprocessing.Imputer

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

About sklearn.preprocessing.Imputer
About LangID
About CAGR
About python-apt
About Permission
About gunicorn
About requirements.txt
About locale
About permissions
About Opencv ②
About axis = 0, axis = 1
About Opencv ③
About import
About numpy
About pip
About Linux
About numpy.newaxis
About endian
About Linux
About import
About Opencv ①
About Linux
About Linux
About Linux ①
About cv2.imread
About _ and __
About wxPython
Notepad about TecoGAN
About python slices
Briefly about __name__
About python comprehension
About Docker Volume
[Linux] About export
About reference type
About the test
Learn about programming
About Flask customization
About variable scope. .. ..
About Python tqdm.
About python yield
Notes about with
About python, class
About Linear Models
About Go functions
About pandas describe
About Kivy root
About Firestore timeout
About python inheritance
About python, range ()
About Confusion Matrix
[Linux] About PATH
About python decorators
Linux (about groups)
Note about awk
About python reference
About Bitnami Autostart
About Python decorators
About Milkcocoa SDK
Notes about pytorch
[Python] About multi-process
About Numpy broadcast