code: def matthews(y_true, y_pred):
      from tensorflow.keras import backend as K
  
      y_pred_pos = K.round(K.clip(y_pred, 0, 1))
      y_pred_neg = 1 - y_pred_pos
  
      y_pos = K.round(K.clip(y_true, 0, 1))
      y_neg = 1 - y_pos
  
      tp = K.sum(y_pos * y_pred_pos)
      tn = K.sum(y_neg * y_pred_neg)
  
      fp = K.sum(y_neg * y_pred_pos)
      fn = K.sum(y_pos * y_pred_neg)
  
      numerator = tp * tn - fp * fn
      denominator = K.sqrt(
          (tp + fp) * (tp + fn) * (tn + fp) * (tn + fn)
      )
  
      return numerator / (denominator + K.epsilon())
  
file_path: talos/talos/metrics/keras_metrics.py
label_desc: Use image node_id 8 for calling a global function with example usage: matthews(y_true, y_pred) and returns: unknown