数据预览:
箱线图boxplot
PCA后散点图,拟合直线/曲线
调参
1.GridSearchCV
2.回归问题:sklearn.feature_selection.f_regression
相关性:
1.pearsonr函数
2.corr()(实际也是pearson相关度)
3.excel内置函数
4.信息增益比、基尼系数
5.f_regression函数F值和p-value
matplotlib画图显示中文:
plt.rcParams['font.sans-serif']=['SimHei'] #用来正常显示中文标签
plt.rcParams['axes.unicode_minus']=False #用来正常显示负号
将string转数值画图:
label1 = preprocessing.LabelEncoder()
df1['a'] = label1.fit_transform(df1['a'])
数据集分割:
kFold、train_test_split
交叉验证:
分类:cross_val_score函数
回归问题评估:
MAE MSE R2(平方)…