1
我正在運行GridSearchCV以查找GradientBoostingRegressor的最佳參數。使用GridSearchCV GBRT超參數調整
給出的教程是使用MSE進行評分。
gs_cv = GridSearchCV(est, param_grid, scoring='mean_squared_error', n_jobs=4).fit(X_train, y_train)
是否可以使用其他自己定義的評分,如均方根對數誤差(RMSLE)來獲得最佳超參數?
def rmsle(predicted, actual, size):
return np.sqrt(np.nansum(np.square(np.log(predicted + 1) - np.log(actual + 1)))/float(size))
太棒了,謝謝! – ananuc