(config, y_true=None, y_pred=None)
return score
candies function of metrics
      calc metrics through `y_true` and `y_pred` or
      `confusion` will be deprecated
candies function of metrics
      calc metrics through `y_true` and `y_pred` or
      `confusion` will be deprecated
candies function of metrics calc metrics through y_true and y_pred or confusion will be deprecated
def get_metrics(config, y_true=None, y_pred=None):
  ''' candies function of metrics
      calc metrics through `y_true` and `y_pred` or
      `confusion` will be deprecated
  '''
  metrics = config['solver']['metrics']
  if isinstance(metrics, list):  # metrics for multi-outputs
    if len(y_true) != len(y_pred) or len(metrics) != len(y_true):
      raise ValueError("Length of y_true, y_pred and metrics must be equal!")
    score = []
    for i, metrics_one_output in enumerate(metrics):
      score.append(
          run_metrics_for_one_output(metrics_one_output, y_true[i], y_pred[i]))
  else:
    score = run_metrics_for_one_output(metrics, y_true, y_pred)
  return score
def get_metrics ( config , y_true = None , y_pred = None ) : metrics = config [ 'solver' ] [ 'metrics' ] if isinstance ( metrics , list ) : # metrics for multi-outputs if len ( y_true ) != len ( y_pred ) or len ( metrics ) != len ( y_true ) : raise ValueError ( "Length of y_true, y_pred and metrics must be equal!" ) score = [ ] for i , metrics_one_output in enumerate ( metrics ) : score . append ( run_metrics_for_one_output ( metrics_one_output , y_true [ i ] , y_pred [ i ] ) ) else : score = run_metrics_for_one_output ( metrics , y_true , y_pred ) return score