docstr: [Calculates the metrics for regression problems]
  
  Args:
      y_true ([type]): [True labels from the dataset]
      predicted ([type]): [Predicted values from the model]
  
  Returns:
      Mean Absolute Error
      Mean Squared Error
      R-Squared Value
docstr_tok: ["[","Calculates","the","metrics","for","regression","problems","]","Args",":","y_true","(","[","type","]",")",":","[","True","labels","from","the","dataset","]","predicted","(","[","type","]",")",":","[","Predicted","values","from","the","model","]","Returns",":","Mean","Absolute","Error","Mean","Squared","Error","R-Squared","Value"]
code: def regression_cohort_metrics(self, y_true, predicted):
      """[Calculates the metrics for regression problems]
  
      Args:
          y_true ([type]): [True labels from the dataset]
          predicted ([type]): [Predicted values from the model]
  
      Returns:
          Mean Absolute Error
          Mean Squared Error
          R-Squared Value
      """
      if len(y_true) != 0:
          # Mean Absolute Error
          mae = round(metrics.mean_absolute_error(y_true, predicted), 2)
          # Mean Squared Error
          mse = round(metrics.mean_squared_error(y_true, predicted), 2)
          # R2
          r2 = round(metrics.r2_score(y_true, predicted), 2)
  
          return mae, mse, r2
      else:
          pass
  
file_path: explainx/lib/cohort_analysis.py
imports: from imports import *
label_desc: Use image node_id 12 for calling the cohortAnalysis obj's underlying member method code with example usage: obj.regression_cohort_metrics(y_true, predicted) and returns: mae,  mse,  r2