cratepy.optimization.optimizationfunction.RelativeRootMeanSquaredError¶
- class RelativeRootMeanSquaredError[source]¶
Bases:
Loss
Relative Root Mean Squared Error (RRMSE).
Constructor.
List of Public Methods
Loss function.
Methods
- loss(y, y_ref, type='minimization')[source]¶
Loss function.
The Relative Root Mean Squared Error (RRMSE) is defined as
\[\text{RRMSE} (\boldsymbol{y}, \hat{\boldsymbol{y}}) = \sqrt{\dfrac{\dfrac{1}{n} \sum_{i=1}^{n}(y_{i} - \hat{y}_{i})^{2}}{ \sum_{i=1}^{n} \hat{y}_{i}^{2}}}\]where \(\boldsymbol{y}\) is the vector of predicted values, \(\hat{\boldsymbol{y}}\) is the vector of reference values, and \(n\) is the number of data points.
- Parameters:
- Returns:
loss – Loss function value.
- Return type: