https://github.com/ansebi/maen
https://github.com/ansebi/maen
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ansebi/maen
- Owner: Ansebi
- Created: 2024-03-28T09:34:33.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-12T06:51:44.000Z (10 months ago)
- Last Synced: 2025-01-21T12:35:55.159Z (4 months ago)
- Language: Jupyter Notebook
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MAEN
Mean Absolute Error Normalised
Magnitude-invariant universal loss score.
Designed for evaluating the performance of Times Series Forecast models.
Evaluates such problematic cases as Near-Zero and Flat vectors of target values.Requires min and max reference values.
```
import urllib
urllib.request.urlretrieve(
'https://github.com/Ansebi/maen/blob/main/maen_score.py?raw=true',
'maen_score.py'
)
from maen_score import np, maen_score'''
y_train = np.random.normal(0, 0.00001, 100)
y_test = np.random.normal(0, 0.00001, 10)
y_pred = np.random.normal(0, 0.00001, 10)
'''
y_train: np.array = ...
y_test: np.array = ...
y_pred: np.array = ...maen = maen_score(y_test, y_pred, y_train.min(), y_train.max())
[print(i) for i in zip(y_test, y_pred)]
print(f'{maen = :.2f}')
```