22
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

sklearn.preprocessing.Imputer について

Posted at

現在(2020/03/03),COVID-19の感染拡大に伴う小中高校の休校を受け,N予備校の教材がすべて無料公開されています.僕も「機械学習 入門」に手を付けているとことでありますが,「12.欠損値の扱い方」でちょっとしたトラブルが発生.

エラー

ImportError: cannot import name 'Imputer' from 'sklearn.preprocessing'

僕の使っているscikit-learnのversionは0.22.2なのですが,このバージョンではsklearn.preprocessing.Imputerがサポートされていないようです.


解決策を調べました.

from sklearn.impute import SimpleImputer

を使えば良いようです.

22
7
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
22
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?