| Type | Details | |
|---|---|---|
| y_true | ArrayLike | The actual values. |
| y_pred | ArrayLike | The predicted values. |
| Returns | float | The MAPE value rounded to 2 decimal places. |
Metrics
MAPE
def MAPE(
y_true:ArrayLike, # The actual values.
y_pred:ArrayLike, # The predicted values.
)->float: # The MAPE value rounded to 2 decimal places.
Calculate the Mean Absolute Percentage Error (MAPE) between actual and predicted values.
SMAPE
def SMAPE(
y_true:ArrayLike, # The actual values.
y_pred:ArrayLike, # The predicted values.
)->float: # The SMAPE value rounded to 2 decimal places.
Calculate the Symmetric Mean Absolute Percentage Error (SMAPE) between actual and predicted values.
| Type | Details | |
|---|---|---|
| y_true | ArrayLike | The actual values. |
| y_pred | ArrayLike | The predicted values. |
| Returns | float | The SMAPE value rounded to 2 decimal places. |
WMAPE
def WMAPE(
y_true:ArrayLike, # The actual values.
y_pred:ArrayLike, # The predicted values.
)->float: # The WMAPE value.
“ Calculate the Weighted Mean Absolute Percentage Error (WMAPE) between actual and predicted values.
| Type | Details | |
|---|---|---|
| y_true | ArrayLike | The actual values. |
| y_pred | ArrayLike | The predicted values. |
| Returns | float | The WMAPE value. |
MAE
def MAE(
y_true:ArrayLike, # The actual values.
y_pred:ArrayLike, # The predicted values.
)->float: # The MAE value.
Calculate mean absolute error (MAE).
| Type | Details | |
|---|---|---|
| y_true | ArrayLike | The actual values. |
| y_pred | ArrayLike | The predicted values. |
| Returns | float | The MAE value. |
MSE
def MSE(
y_true:ArrayLike, # The actual values.
y_pred:ArrayLike, # The predicted values.
)->float: # The MSE value.
Calculate mean squared error (MSE).
| Type | Details | |
|---|---|---|
| y_true | ArrayLike | The actual values. |
| y_pred | ArrayLike | The predicted values. |
| Returns | float | The MSE value. |
RMSE
def RMSE(
y_true:ArrayLike, # The actual values.
y_pred:ArrayLike, # The predicted values.
)->float: # The RMSE value.
Calculate Root Mean Square Error (RMSE).
| Type | Details | |
|---|---|---|
| y_true | ArrayLike | The actual values. |
| y_pred | ArrayLike | The predicted values. |
| Returns | float | The RMSE value. |
SRMSE
def SRMSE(
y_true:ArrayLike, # The actual values.
y_pred:ArrayLike, # The predicted values.
y_train:ArrayLike, # The training values used for scaling.
)->float: # The SRMSE value.
Calculate Scaled Root Mean Square Error (SRMSE).
| Type | Details | |
|---|---|---|
| y_true | ArrayLike | The actual values. |
| y_pred | ArrayLike | The predicted values. |
| y_train | ArrayLike | The training values used for scaling. |
| Returns | float | The SRMSE value. |
RMSSE
def RMSSE(
y_true:ArrayLike, # The actual values.
y_pred:ArrayLike, # The predicted values.
y_train:ArrayLike, # The training values used for scaling.
)->float: # The RMSSE value.
Calculate Root Mean Squared Scaled Error (RMSSE).
| Type | Details | |
|---|---|---|
| y_true | ArrayLike | The actual values. |
| y_pred | ArrayLike | The predicted values. |
| y_train | ArrayLike | The training values used for scaling. |
| Returns | float | The RMSSE value. |
MASE
def MASE(
y_true:ArrayLike, # The actual values.
y_pred:ArrayLike, # The predicted values.
y_train:ArrayLike, # The training values used for scaling.
)->float: # The MASE value.
Calculate Mean Absolute Scaled Error (MASE)
| Type | Details | |
|---|---|---|
| y_true | ArrayLike | The actual values. |
| y_pred | ArrayLike | The predicted values. |
| y_train | ArrayLike | The training values used for scaling. |
| Returns | float | The MASE value. |
CFE
def CFE(
y_true:ArrayLike, # The actual values.
y_pred:ArrayLike, # The predicted values.
)->float:
Calculate Cumulative Forecast Error (CFE). It is the cumulative sum of the differences between actual and predicted values.
| Type | Details | |
|---|---|---|
| y_true | ArrayLike | The actual values. |
| y_pred | ArrayLike | The predicted values. |
| Returns | float |
CFE_ABS
def CFE_ABS(
y_true:ArrayLike, # The actual values.
y_pred:ArrayLike, # The predicted values.
)->float: # The absolute CFE value.
Calculate Absolute Cumulative Forecast Error (CFE_ABS). It is the absolute value of the cumulative sum of the differences between actual and predicted values.
| Type | Details | |
|---|---|---|
| y_true | ArrayLike | The actual values. |
| y_pred | ArrayLike | The predicted values. |
| Returns | float | The absolute CFE value. |