Giter Club home page Giter Club logo

Comments (6)

kdgutier avatar kdgutier commented on September 26, 2024 1

Thanks for the comment,
I will incorporate into the library renaming MSSE into RelMSE.

from hierarchicalforecast.

nickto avatar nickto commented on September 26, 2024

Sorry, RMSSE formula rendered incorrectly, here is a screenshot from the article
image

from hierarchicalforecast.

kdgutier avatar kdgutier commented on September 26, 2024

Hey @nickto,

Thanks for the comment.

I think the RMSSE equation is consistent with the definition of HierarchicalForecast's MSSE because $\hat{y}^{naive}=y_{t-1}$ is the Naive forecast that is scaling, and that is relativizing the error measure.

The MSSE satisfies both being scaled and being a relative metric simultaneously.

from hierarchicalforecast.

nickto avatar nickto commented on September 26, 2024

Hi @kdgutier ,

I think the inconsistency is only in the period on which the scaling factor is computed.

Hyndman and Koehler (2006) and Makridakis et al. (2002) compute the scaling factor on the training (in-sample) data data only.

However, in HierarchicalForecast the scaling factor is computed on the out-of-sample data:

y_naive = np.repeat(y_train[:,[-1]], horizon, axis=1) # rolling naive forecast for the whole forecasting horizon
norm = mse(y=y, y_hat=y_naive)                        # compare to true out-of-sample values

If I understand correctly, this metric would have been called "relative MSE", according to Hyndman and Koehler (2006). Relative MSE is the ratio between our model MSE and some benchmark MSE (rolling naive forecast in this case).

In order to make msse() more consistent with Hyndman and Koehler (2006) and Makridakis et al. (2022), I guess it should be something along the lines of

y_naive = y_train[:, :-1]                 # make 1 step ahead naive forecast of the in-sample values
y_naive_true = y_train[:, 1:]             # in-sample true values
norm = mse(y=y_naive_true, y_hat=y_naive) # compare to true in-sample values

If my reasoning is wrong (which can very well be), I would be thankful if you could point out what I have overlooked or misunderstood.

from hierarchicalforecast.

kdgutier avatar kdgutier commented on September 26, 2024

@nickto
Would you suggest that going beyond a forecast of $t+1$ would merit to change the scale nomenclature into a relative nomenclature? But with a single step ahead forecast it is scaled?

Is that the difference?

from hierarchicalforecast.

nickto avatar nickto commented on September 26, 2024

@kdgutier, I tried creating a PR-185, but not entirely sure if it works with your PR. But hope it could be useful :)

Also, thank you for such a an incredibly quick feedback!

from hierarchicalforecast.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.