6.5. UCTB.evaluation package

6.5.1. UCTB.evaluation.metric module

UCTB.evaluation.metric.mae(prediction, target, threshold=None)

Mean Absolute Error (MAE)

Parameters:
  • prediction (ndarray) – prediction with shape [batch_size, …]
  • target (ndarray) – same shape with prediction, [batch_size, …]
  • threshold (float) – data smaller or equal to threshold in target will be removed in computing the mae
UCTB.evaluation.metric.mape(prediction, target, threshold=0)

Mean Absolute Percentage Error (MAPE)

Parameters:
  • prediction (ndarray) – prediction with shape [batch_size, …]
  • target (ndarray) – same shape with prediction, [batch_size, …]
  • threshold (float) – data smaller than threshold in target will be removed in computing the mape.
UCTB.evaluation.metric.rmse(prediction, target, threshold=None)

Root Mean Square Error (RMSE)

Parameters:
  • prediction (ndarray) – prediction with shape [batch_size, …]
  • target (ndarray) – same shape with prediction, [batch_size, …]
  • threshold (float) – data smaller or equal to threshold in target will be removed in computing the rmse
UCTB.evaluation.metric.smape(prediction, target, threshold=0)

Symmetric Mean Absolute Percentage Error (SMAPE)

Parameters:
  • prediction (ndarray) – prediction with shape [batch_size, …]
  • target (ndarray) – same shape with prediction, [batch_size, …]
  • threshold (float) – data smaller than threshold in target will be removed in computing the smape.
UCTB.evaluation.metric.trunc_mae(prediction, target, threshold=0)
Mean Absolute Error with Truncation (Trunc_MAE)
Parameters:
  • prediction (ndarray) – prediction with shape [batch_size, …]
  • target (ndarray) – same shape with prediction, [batch_size, …]
  • threshold (float) – data smaller or equal to threshold in target will be replaced in computing the mae
UCTB.evaluation.metric.trunc_rmse(prediction, target, threshold=0)

Root Mean Square Error with Truncation (trunc_RMSE) :param prediction: prediction with shape [batch_size, …] :type prediction: ndarray :param target: same shape with prediction, [batch_size, …] :type target: ndarray :param threshold: data smaller or equal to threshold in target

will be replaced by threshold in computing the s_rmse
UCTB.evaluation.metric.trunc_smape(prediction, target, threshold=0)

Symmetric Mean Absolute Percentage Error with Truncation (Trunc_SMAPE)

Parameters:
  • prediction (ndarray) – prediction with shape [batch_size, …]
  • target (ndarray) – same shape with prediction, [batch_size, …]
  • threshold (float) – data smaller than threshold in target will be replaced in computing the trunc_smape.