code: def correlation_evaluator(
      test_data: pd.DataFrame,
      prediction_column: str = "prediction",
      target_column: str = "target",
      eval_name: str = None,
  ) -> EvalReturnType:
      """
      Computes the Pearson correlation between prediction and target.
  
      Parameters
      ----------
      test_data : Pandas' DataFrame
          A Pandas' DataFrame with target and prediction.
  
      prediction_column : Strings
          The name of the column in `test_data` with the prediction.
  
      target_column : String
          The name of the column in `test_data` with the continuous target.
  
      eval_name : String, optional (default=None)
          the name of the evaluator as it will appear in the logs.
  
      Returns
      ----------
      log: dict
          A log-like dictionary with the Pearson correlation
      """
  
      if eval_name is None:
          eval_name = "correlation_evaluator__" + target_column
  
      score = (
          test_data[[prediction_column, target_column]]
          .corr(method="pearson")
          .iloc[0, 1]
      )
      return {eval_name: score}
  
imports: import warnings
  from typing import Any, Callable, Iterable, List
  import numpy
  import pandas
  import toolz
  from pandas.util import hash_pandas_object
  from sklearn.metrics import average_precision_score, brier_score_loss, fbeta_score, log_loss, mean_absolute_error, mean_squared_error, precision_score, r2_score, recall_score, roc_auc_score
  from toolz import curry, last, first
  from scipy import optimize
  from sklearn.linear_model import LogisticRegression
  from fklearn.types import EvalFnType, EvalReturnType, PredictFnType, UncurriedEvalFnType
label_desc: Use image node_id 14 for calling a global function with example usage: correlation_evaluator(test_data, prediction_column, target_column, eval_name) and returns: dict