GithubHelp home page GithubHelp logo

Is there a way to train a forecasting model for a few epochs with one training length, and then increase the length for some further epochs? about darts HOT 3 OPEN

chododom avatar chododom commented on June 14, 2024
Is there a way to train a forecasting model for a few epochs with one training length, and then increase the length for some further epochs?

from darts.

Comments (3)

dennisbader avatar dennisbader commented on June 14, 2024

Hi @chododom, internally RNN has an output_chunk_length=1, meaning during prediction when n>output_chunk_length it will always perform auto-regression (consuming it's own predictions for future predictions) to forecast n points.

training_length just means how of those auto-regressive predictions it performs for one sample during training.

You can do two things:

  • simply increase n from 4 to 8 when calling predict()
  • multiple training:
    • train a model1 with the lower training_length
    • save the model with model1.save(...)
    • create a new model2 object with the same hyperparameters but different training_length
    • load the weights from model1 save into model2 with model2.load_weights(...) (since training_length changed, for this to work you need to set skip_checks=True, and load_encoders=False).
    • train model2

from darts.

adesso-dominik-chodounsky avatar adesso-dominik-chodounsky commented on June 14, 2024

@dennisbader Thank you for the advice! Do you think this will also work with the TFT model? If I understand correctly, the TFT has a built-in prediction horizon length.

from darts.

dennisbader avatar dennisbader commented on June 14, 2024

@adesso-dominik-chodounsky, any of Darts' torch models (neural networks) and regression models support auto-regressive predictions with n>output_chunk_length. The only requirement is that if you use past/future_covariates, you must know these far enough into the future to generate the n prediction points.

from darts.

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.