这是线性回归模型的交叉验证代码。你可以看到最好的分数是0.7,但我怎样才能找到最佳分数的模型参数(系数)?
from sklearn.model_selection import cross_val_score
clf = linear_model.LinearRegression()
scores = cross_val_score(clf, data_f[features], data_f['temperature'], cv=5)
scores
这是结果
array([ 0.61858698, 0.52880606, 0.70729139, 0.48306915, 0.68386676])