代码:
onehotencoder = OneHotEncoder(categorical_features = [3])
得到以下错误:
TypeError:init()获得了意外的关键字参数'categorical_features'
As Chris said,[c0]的categorical_features
参数在scikit-learn的0.20版本中已弃用。弃用请参见preprocessing.OneHotEncoder
,preprocessing.OneHotEncoder
,the relevant release notes和commit。然后在版本0.22中将其删除。请参阅pull request和issue进行删除。