Metrics


source

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.


source

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.


source

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.


source

MAE


def MAE(
    y_true:ArrayLike, # The actual values.
    y_pred:ArrayLike, # The predicted values.
)->float: # The MAE value.

Calculate mean absolute error (MAE).


source

MSE


def MSE(
    y_true:ArrayLike, # The actual values.
    y_pred:ArrayLike, # The predicted values.
)->float: # The MSE value.

Calculate mean squared error (MSE).


source

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).


source

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).


source

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).


source

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)


source

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.


source

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.