code: def corr(pred, gt):
      """
      Desc:
          Correlation between the prediction and ground truth
      Args:
          pred:
          gt: ground truth vector
      Returns:
          Correlation
      """
      _corr = 0.0
      if len(pred) > 0 and len(gt) > 0:
          u = ((gt - gt.mean(0)) * (pred - pred.mean(0))).sum(0)
          d = np.sqrt(
              ((gt - gt.mean(0)) ** 2 * (pred - pred.mean(0)) ** 2).sum(
                  0
              )
          )
          _corr = (u / d).mean(-1)
      return _corr
  
file_path: PGL/examples/kddcup2022/wpf_baseline/metrics.py
imports: import pandas
  import time
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: corr(pred, gt) and returns: _corr