当我使用如下代码时,我完全感到困惑:
kfold = model_selection.KFold(n_splits=4, random_state=42, shuffle=True)
scoring1 = 'neg_mean_absolute_error'
scoring2 = 'r2'
scoring3 = 'neg_mean_squared_error'
results1 = model_selection.cross_val_score(lmodel, Xtrain, Ytrain, cv=kfold, scoring=scoring1)
results2 = model_selection.cross_val_score(lmodel, Xtrain, Ytrain, cv=kfold, scoring=scoring2)
results3 = model_selection.cross_val_score(lmodel, Xtrain, Ytrain, cv=kfold, scoring=scoring3)
print("MAE: %.10f (%.10f)" % (results1.mean(), results1.std()))
哪个值显示更好的性能?例如,当 score1 的数字分别为 -1.4 和 -2.5,model1 和 model2 和 model3 分别为 2.3 时,哪个模型在 score1 方面效果更好?