def pearson_scorer(estimator, X, y): logging.info('predicting ...') predicted = estimator.predict(y) return pearsonr(list(predicted), y)