0
$\begingroup$

I am analyzing the results of various machine learning models for a regression task, using four metrics: RMSE, MAE, MAPE, and $R^2$. My approach involves two types of analyses:

  1. Individual Metric Analysis: Where each metric is considered separately.
  2. Composite Performance Metric Analysis: A combined metric to determine the best model among the candidates.

The Composite Performance Metric (CPM) incorporates the standardized mean of the metrics derived from the individual results obtained through cross-validation: $$ \begin{equation} \text{CPM} = M_{norm}(\text{RMSE}) + M_{norm}(\text{MAE}) + M_{norm}(\text{MAPE}) - M_{norm}(R^2) \end{equation} $$

where

$$ \begin{equation} M_{norm}(\text{metric}) = \frac{\text{metric} - \mu_{\text{metric}}}{\sigma_{\text{metric}}} \end{equation} $$ and $\mu_\text{metric}$ is the overall mean of the metric across all models, and $\sigma_\text{metric}$ is the overall standard deviation of the metric across all models.

The CPM prioritizes models with lower errors (RMSE, MAE, MAPE) and higher $R^2$ values. By standardizing each metric, the CPM ensures that all metrics contribute equally, allowing for a fair comparison across different models. It essentially functions as a weighted sum where each metric is equally weighted.

The Issue with Sign Changes

However, I've encountered a potential issue: during the standardization process, the signs of some metrics may change. This could lead to misleading results when calculating the CPM. For instance, if the sign of $R^2$ flips due to standardization, it might inadvertently increase the CPM, penalizing models that should be rewarded for their higher $R^2$ values.

Proposed Solution

To address this issue, I am considering the following approach:

  • Error Metrics (RMSE, MAE, MAPE): Since these metrics are non-negative, I propose taking the absolute value of the standardized metrics to ensure they always contribute positively to the CPM.
  • $R^2$ Metric: I suggest preserving the original sign of $R^2$ before standardization and reapplying it afterward to maintain its intended influence on the CPM.

Request for Feedback

Does this approach seem valid, or am I overlooking something? Are there alternative methods or considerations that might better address the issue of sign changes during standardization in the context of the CPM?

$\endgroup$

1 Answer 1

1
$\begingroup$

You are focussing way too much on the sign; and yes, that is misleading you.

You should only worry about the order or direction. Ask yourself: will a model with better performance get a higher or a lower metric. This order / direction does not change with the standardization.

So: Just keep your CPM as intended.

$\endgroup$
13
  • $\begingroup$ Here's an example from my results. This model performs poorly. The RMSE normalization flips sign, as does the negative R². Instead of contributing positively, RMSE contributes negatively, making the score seem better than it is. The same issue occurs with R2. RMSE_mean = 6.559, MAE_mean = 5.93, MAPE_mean = 13.127, R²_mean = -3.102, RMSE_mean_norm = -0.001, MAE_mean_norm = 0.298, MAPE_mean_norm = 0.257, R²_mean_norm = 0.207, CPM = 0.346 The lower RMSE may not have much impact, but R2 does. $\endgroup$
    – Felipe
    Commented Aug 24 at 22:57
  • $\begingroup$ Keep in mind: your normalization will map an average performance to 0. So R2_mean_norm = 0.207 means that the r2 score is higher than the average of all models. $\endgroup$
    – Broele
    Commented Aug 24 at 23:17
  • $\begingroup$ Btw: R2 should typically be in the range of 0 to 1. How do you get R2_mean = -3.102? $\endgroup$
    – Broele
    Commented Aug 24 at 23:19
  • $\begingroup$ Actually, R2 can be negative. It is not limited to the range 0-1. A negative R2 means that a model's performance is worse than an horizontal line. There are several reasons why R2 can be negative, for instance, it is very sensitive to outliers, a unique extreme value could lead to a negative R2. $\endgroup$
    – Felipe
    Commented Aug 24 at 23:21
  • $\begingroup$ Yes, thats why I wrote "should typically". But still: your model is 3 times worse than just taking the average. How did you get that. $\endgroup$
    – Broele
    Commented Aug 24 at 23:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.