GithubHelp home page GithubHelp logo

Comments (4)

KaixuYang avatar KaixuYang commented on July 20, 2024

Hi @Sigvesor what does your df_model look like? If the last available date in your df_model is 2020-2-20 9:00:00, then you don't have to explicitly specify the train_end_date. The forecast.forecast_result.forecast includes the forecasted values in the future period (starting 2020-2-20 10:00:00). And you can also use forecaster.model.predict on any future data frame similar to df_model.

The error looks like there are regressor columns in your model and the future values were not provided? Could you confirm that?

from greykite.

Sigvesor avatar Sigvesor commented on July 20, 2024

Hi @KaixuYang, thanks for the reply.

You are correct, I have regressor columns. The df_model I give run_forecast_config() consist of the columns "ts", "y", "regressor1", "regressor2".

regressors = {
"regressor_cols": ["regressor1", "regressor2"]
}

All columns has the same last timestep 2020-2-20 9:00:00. I can confirm that future values are not provided. Am I supposed to give the future values in run_forecast_config() ? I though I would merge the future values of the regressors with the future dataframe and run forecaster.model.predict on this. This was how I used to proceed with fbprophet. What am I missing here?

from greykite.

KaixuYang avatar KaixuYang commented on July 20, 2024

@Sigvesor When you run run_forecast_config, the method

  • fits cross-validation
  • fits train/test split
  • fits model on entire data
  • generates prediction for the future period (specified by forecast_horizon) based on the model fitted on entire data

So you don't have to call predict on yourself. If you include the future rows in the df_model, leaving the values to be NA and including the regressor future values, the forecast will be generated automatically and stored in forecast_result.forecast. And you can make forecast on different time period by calling the forecast_result.model.predict method.

from greykite.

Sigvesor avatar Sigvesor commented on July 20, 2024

@KaixuYang,

Perfect, thanks for the help!

from greykite.

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.