ourownstory / neural_prophet

NeuralProphet: A simple forecasting package
https://neuralprophet.com
MIT License
3.81k stars 472 forks source link

MSE in METRICS not found #745

Closed tulbureandreit closed 2 years ago

tulbureandreit commented 2 years ago

Hi,

When I want to be able to use the MSE in metrics when getting training and evaluation data, I am not able to use MSE although MSE is stated in the documentation as being something that is available.

Moreover, I looked into the forecaster.py file and -> and in line 295, in the collect metrics list "mse" is omitted.

Hence, if you add in that list also mse, everything works fine.

To Reproduce

Use any kind of data and when collecting the METRICS, use ""MSE""

Expected behavior The MSE shall be returned

What actually happens KeyError: "['MSE'] not in index"

Environement (please complete the following information):

Additional context

Please see the what happened for the fix. Add mse in forecaster .py in line 295 in the metrics list.

Thank you.

ourownstory commented 2 years ago

Hi @tulbureandreit

Thank you for bringing this to our attention. The documentation was not quite clear on this (I just fixed it in #746), but you can actually specify a custom list of metrics. While MSE is not a default, it can be included like this: m = NeuralProphet(collect_metrics=["MSE", "MAE", "RMSE"])

I hope this helps?

tulbureandreit commented 2 years ago

Yes, it helps. thanks!