This module contains additional performance metrics that are not implemented in the standard libraries but are needed to assess the performance of ML models in the BIGG use cases.
The Mean Bias Error (MBE) captures the bias of the model when predicting. According to the ASHRAE guidelines, a positive value implies a positive bias and an underestimation of the output variable, while a negative bias implies an overestimation. For example, if we are predicting the electricity consumption, a positive value of the MBE would mean that the model under-predicts the measured consumptions. However the MBE suffers from cancellation errors, i.e. the sum of positive and negative values could reduce the value of MBE.
-
y_true:
timeSeries
. Timeseries of the true values of the target variable$y$ . -
y_pred:
timeSeries
. Timeseries of the predicted values of the target variable$\hat{y}$ . -
normalised:
boolean
. Normalise by the mean if True. -
number_of_parameters:
integer
. Number of adjustable model parameters. It is used to compute the degrees of freedom of the estimate.
- loss:
float
. A non-negative floating point value (the best value is 0.0), or an array of floating point values, one for each individual target in case of multiple outputs.
The MBE should be ideally as close to zero as possible. This would mean that the model is neither underestimating or overestimating the consumptions.
However,
According to ASHRAE guidelines, the formula with normalised=False
is:
normalised=True
, the normalised version of the MBE, called NMBE, can be expressed as a percentage:
The Coefficient of Variation of the Root Mean Squared Error (CVRMSE) is a normalized version of the RMSE. It measures the variability of the errors between measured and simulated values. It does not suffer from cancellation errors because of the square operator but, on the other side, it punishes larger errors.
-
y_true:
timeSeries
. Timeseries of the true values of the target variable$y$ . -
y_pred:
timeSeries
. Timeseries of the predicted values of the target variable$\hat{y}$ . -
number_of_parameters:
integer
. Number of adjustable model parameters. It is used to compute the degrees of freedom of the estimate.
- loss:
float
. A non-negative floating point value (the best value is 0.0), or an array of floating point values, one for each individual target in case of multiple outputs.
The CVRMSE should be ideally as close to zero as possible and can be calculated with the following formula: