It is a memorandum.
Perhaps because I haven't caught up with the evolution of libraries around Python3 and opportunity learning, I left it here because there was an article with a description of the old state.
hoge.py
from sklearn.preproceccing import Imputer
imp = Imputer(strategy="mean",axis=0)
The above is the description used when calculating the average value of missing values, but it seems that it has already been abolished by the version. Therefore, an error will occur depending on the version. (Slightly clogged ...) After a lot of research, I found the following article, so if you want to know more about it, it is best to look at this article.
I tried to deal with the scikit-learn warning that I encountered during copying https://qiita.com/y_nishimura/items/6d022a25beb21a186d60
Then, how can I get an error?
hoge.py
from sklearn.impute import SimpleImputer
imp = SimpleImputer(strategy='mean')
It seems that it can be calculated by using SimpleImputer. It's good to study using books, but there are some errors like this, which is a pitfall.
Recommended Posts