from sklearn.preprocessing import PowerTransformer
pt = PowerTransformer(method='yeo-johnson',standardize=True)
X_train['feature']=pt.fit_transform(np.array(X_train['feature']).reshape(-1, 1))
#fit the model only on the train set and transform the test set
X_test['feature']=pt.transform(np.array(X_test['feature']).reshape(-1, 1))
低于误差
属性错误:模块"numpy"没有属性"warnings"
1条答案
按热度按时间wkftcu5l1#
正常工作,numpy==1.23.4
给出numpy==1.24.0的误差