Code Monkey home page Code Monkey logo

Comments (6)

jmoralez avatar jmoralez commented on May 27, 2024

Hey @RashidBakirov, thanks for using mlforecast. If you don't specify static_features they're all interpreted as static, so setting static_features=None (the default) or static_features=['feat'] is the same. I believe the outputs are correct here, aren't they? In one of the cases feat is being intepreted as static and in the other case as dynamic.

from mlforecast.

RashidBakirov avatar RashidBakirov commented on May 27, 2024

Hi @jmoralez

According to the documentation of cross_validation, the final two cross_validation calls fcst.cross_validation(df,n_windows=1,h=1,static_features=[]) and fcst.cross_validation(df,n_windows=1,h=1) should have resulted in the same outcome, with feat being treated as dynamic, at least this is my interpretation. This was also an impression I got from my previous question on this #144 . However, it looks omitting static_features argument assigns feat to be static.

Perhaps the documentation should be made more explicit to avoid misunderstandings.

from mlforecast.

jmoralez avatar jmoralez commented on May 27, 2024

As I said in my previous answer, the default is to treat all features as static, so:

  • static_features=None (the default) -> static = ['feat'], dynamic = []
  • static_features=['feat'] -> static = ['feat'], dynamic = []
  • static_features=[] -> static = [], dynamic = ['feat']

So it's expected for those two commands to differ, since in the first one feat is dynamic and in the second one feat is static. That's the same case with predict, so if you don't set static_features and then provide X_df you'll get an error. It'd be expensive to validate if the static features are actually static (constant) but we could add something to see if the first and last rows don't match and raise an error.

from mlforecast.

RashidBakirov avatar RashidBakirov commented on May 27, 2024

As I said in my previous answer, the default is to treat all features as static, so:

  • static_features=None (the default) -> static = ['feat'], dynamic = []

I understand this now, but I do feel that the above is confusing, and at least could be explicitly mentioned in the documentation.

It'd be expensive to validate if the static features are actually static (constant) but we could add something to see if the first and last rows don't match and raise an error.

I would rather keep the current (replication of the last value) behaviour for static features even if they are not quite static, but their future values are not known.

Thanks for your help!

from mlforecast.

jmoralez avatar jmoralez commented on May 27, 2024

Would you like to modify the wording here a bit to make it clearer?

from mlforecast.

github-actions avatar github-actions commented on May 27, 2024

This issue has been automatically closed because it has been awaiting a response for too long. When you have time to to work with the maintainers to resolve this issue, please post a new comment and it will be re-opened. If the issue has been locked for editing by the time you return to it, please open a new issue and reference this one.

from mlforecast.

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.