Code Monkey home page Code Monkey logo

Comments (3)

RJT1990 avatar RJT1990 commented on June 7, 2024

Sure. There are two ways to do this:

  1. Explicit multivariate models - only VAR models at the moment in this library. You would enter a dataframe with the multiple series, specify the lag order, then you can do multivariate prediction straight from there.
  2. Implicit multivariate models - if there is one series in particular you are interested in, then first choose a model that allows you to include exogenous variables, such as:
  • ARIMAX model
  • GASX model
  • GASReg model
  • Dynamic Linear Regression model (Gaussian state space)
  • Dynamic Non-Linear Regression model (Non-Gaussian state space)

And include the other series as your predictors via patsy notation (see examples). The tricky bit is how to do prediction with these exogenous variables - you'll need to forecast the exogenous variables (e.g. estimate univariate models on these and get predictions via the predict() method). Once you have the predictions for the exogenous variables, put them into a dataframe. Then use this dataframe in the predict() method of your main model as the oos_data() argument.

Appreciate the answer above is a bit verbose. TLDR answer is: make forecasts of the exogenous variables, make a dataframe out of them, and include the dataframe as the data_oos argument in predict().

from pyflux.

fccoelho avatar fccoelho commented on June 7, 2024

Thanks! it really helped.

from pyflux.

RJT1990 avatar RJT1990 commented on June 7, 2024

No worries at all.

from pyflux.

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.