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_metrics(self, target_data, 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
      """
      from sklearn import metrics
  
      if len(target_data) != 0:
          # Mean Absolute Error
          mae = round(
              metrics.mean_absolute_error(target_data, predicted), 2
          )
          # Mean Squared Error
          mse = round(
              metrics.mean_squared_error(target_data, predicted), 2
          )
          # R2
          r2 = round(metrics.r2_score(target_data, predicted), 2)
          results = {"mae": mae, "mse": mse, "R2": r2}
          return results
      else:
          raise Exception("Metrics calculation failed")
  
file_path: explainx/lib/models/modelprocessor.py
imports: from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor
  import numpy
  import pandas
  from sklearn.preprocessing import LabelEncoder
  from typing import Dict, List, Union
  from sklearn.impute import SimpleImputer
  from explainx.lib.utils import is_classification
label_desc: Use image node_id 11 for calling the ModelProcessor obj's underlying member method code with example usage: obj.regression_metrics(target_data, predicted) and returns: results