class_docstr: Container holding a list of metrics.
  
  Parameters
  ----------
  metric_names : list of str
      List of metric names.
  prefix : str
      Prefix of metric names.
class_docstr_tok: ["Container","holding","a","list","of","metrics",".","Parameters","--","--","--","--","--","metric_names",":","list","of","str","List","of","metric","names",".","prefix",":","str","Prefix","of","metric","names","."]
docstr: Compute all metrics and store into a dict.
  
  Parameters
  ----------
  y_true : np.ndarray
      Target matrix or vector
  y_pred : np.ndarray
      Score matrix or vector
  
  Returns
  -------
  dict
      Dict of metrics ({metric_name: metric_value}).
docstr_tok: ["Compute","all","metrics","and","store","into","a","dict",".","Parameters","--","--","--","--","--","y_true",":","np.ndarray","Target","matrix","or","vector","y_pred",":","np.ndarray","Score","matrix","or","vector","Returns","--","--","--","-","dict","Dict","of","metrics","(","{","metric_name",":","metric_value","}",")","."]
code: def __call__(self, y_true, y_pred):
      """Compute all metrics and store into a dict.
  
      Parameters
      ----------
      y_true : np.ndarray
          Target matrix or vector
      y_pred : np.ndarray
          Score matrix or vector
  
      Returns
      -------
      dict
          Dict of metrics ({metric_name: metric_value}).
  
      """
      logs = {}
      for metric in self.metrics:
          if isinstance(y_pred, list):
              res = np.mean(
                  [
                      metric(y_true[:, i], y_pred[i])
                      for i in range(len(y_pred))
                  ]
              )
          else:
              res = metric(y_true, y_pred)
          logs[self.prefix + metric._name] = res
      return logs
  
imports: from dataclasses import dataclass
  from typing import List
  import numpy
  from sklearn.metrics import roc_auc_score, mean_squared_error, mean_absolute_error, accuracy_score, log_loss, balanced_accuracy_score, mean_squared_log_error
  import torch
label_desc: Use image node_id 2 for calling the MetricContainer obj's underlying member method code with example usage: obj.__call__(y_true, y_pred) and returns: logs