def score(params): model = XGBRegressor(**params) model.fit(X_train, Y_train, eval_set=[(X_train, Y_train), (X_valid, Y_valid)], verbose=False, early_stopping_rounds=10) Y_pred = model.predict(X_valid).clip(0, 20) score = sqrt(mean_squared_error(Y_valid, Y_pred)) print(score) return {'loss': score, 'status': STATUS_OK}
--
You received this message because you are subscribed to the Google Groups "hyperopt-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hyperopt-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hyperopt-discuss/81acef96-3427-44ef-8f81-f3b4fcbd7a9f%40googlegroups.com.