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