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.

Type Details
y_true ArrayLike The actual values.
y_pred ArrayLike The predicted values.
Returns float The MAPE value rounded to 2 decimal places.

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.

Type Details
y_true ArrayLike The actual values.
y_pred ArrayLike The predicted values.
Returns float The SMAPE value rounded to 2 decimal places.

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.

Type Details
y_true ArrayLike The actual values.
y_pred ArrayLike The predicted values.
Returns float The WMAPE value.

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

Type Details
y_true ArrayLike The actual values.
y_pred ArrayLike The predicted values.
Returns float The MAE value.

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

Type Details
y_true ArrayLike The actual values.
y_pred ArrayLike The predicted values.
Returns float The MSE value.

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

Type Details
y_true ArrayLike The actual values.
y_pred ArrayLike The predicted values.
Returns float The RMSE value.

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

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.

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

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.

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)

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.

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.

Type Details
y_true ArrayLike The actual values.
y_pred ArrayLike The predicted values.
Returns float

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.

Type Details
y_true ArrayLike The actual values.
y_pred ArrayLike The predicted values.
Returns float The absolute CFE value.