You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added mase error measure for continuous variables (Mean Absolute Scaled Error)
Also:
- improved perfomances of the Scaler algorithm using inplace assignments
- perform random reset of a NN model that doesn't converge only if the model has not beeing fitted before
Copy file name to clipboardExpand all lines: src/Utils/Measures.jl
+44Lines changed: 44 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -749,6 +749,50 @@ function relative_mean_error(y,ŷ;normdim=false,normrec=false,p=1)
749
749
end
750
750
751
751
752
+
"""
753
+
mase(y, ŷ;seq=false)
754
+
755
+
Mean absolute scaled error between y and ŷ.
756
+
757
+
A relative measure of error that is scale invariant.
758
+
759
+
If `seq` is `true`, the scaling is done using the in-sample one-step naive forecast method, and the function returns the Mean Absolute Error (MAE) divided by the mean absolute deviation of the difference between consecutive observations of y.
760
+
761
+
When `seq` is `false` (default), the scaling is done using the in-sample mean and the function returns the Mean Absolute Error (MAE) divided by the mean absolute deviation of y. This is also equal to the relative mean error of the zero-mean, unit variance scaled data.
762
+
763
+
See [Wikipedia article](https://en.wikipedia.org/wiki/Mean_absolute_scaled_error).
764
+
765
+
# Notes
766
+
- this function works only for vector data (i.e. single output regression)
767
+
- use `seq=true` for sequential data (e.g. time series)
0 commit comments