Target:记录学习过程中看到的模型python实现
特征处理
标准化
import sklearn.preprocessing
- 官方文档:http://scikit-learn.org/stable/modules/preprocessing.html#preprocessing
- 关键要素:要转换成数组
- normalization( x-m/sigma)
- 构造中心点:scaler = preprocessing.StandardScaler().fit(X_train)
- 规范化:scaler.transform(X_train)
- range( x-min / max-min)
- min_max_scaler = preprocessing.MinMaxScaler()
- X_train_minmax = min_max_scaler.fit_transform(X_train)
随机森林
from sklearn.ensemble import RandomForestRegressor
- 官方文档: