目录
特征工程
#数据预处理 from sklearn.preprocessing import MinMaxScaler #归一化 from sklearn.preprocessing import StandardScaler #标准化 from sklearn.preprocessing import OneHotEncoder #one_hote编码 from sklearn.preprocessing import LabelEncoder #顺序编码 from sklearn.preprocessing import PolynomialFeatures #添加几次的多项式特征 #数据集的分割处理 from sklearn.model_selection import train_test_split #训练集测试集划分 from sklearn.model_selection import StratifiedKFold #交叉验证 from sklearn.model_selection import KFold #交叉验证 from sklearn.model_selection import RandomizedSearchCV #随机搜索 from sklearn.model_selection import GridSearchCV #网格搜索 #不常用 from sklearn.model_selection import StratifiedShuffleSplit #多次划分(分层分割) from sklearn.model_selection import ShuffleSplit #多次划分(随机分割) from sklearn.model_selection import LeaveOneOut #留一法 from sklearn.model_selection import LeavePOut #留P法 #数据填充 from sklearn.impute import SimpleImputer # K近邻的方式填充缺失值 #%% md



