nueramic_mathml.ml.metrics.mape#
- mape(y_true, y_pred)[source]#
Returns MAPE
(1)#\[\displaystyle \mathbf{MAPE}= \frac{100}{n}}\sum _{i=1}^{n}\left|{\frac{A_{i}-F_{i}}{A_{t}}}\right|}\]Note
All values in y_true that are less than 1e-10 in absolute value will be replaced by 1e-10
- Parameters:
y_true (Tensor) – array with true values of regression
y_pred (Tensor) – array with prediction values of regression
- Returns:
mape metric in float number
- Return type:
float