GithubHelp home page GithubHelp logo

Predictions taking too long about greykite HOT 4 CLOSED

linkedin avatar linkedin commented on July 20, 2024
Predictions taking too long

from greykite.

Comments (4)

sayanpatra avatar sayanpatra commented on July 20, 2024

You can significantly reduce runtime by

  1. Using all available CPU cores (Silverkite uses a single core by default).
  2. Reducing cross-validation splits or skipping CV (not recommended). Make sure to cross-validate your model thoroughly on sample datasets beforehand. To do this:
computation = ComputationParam(
        hyperparameter_budget=None,
        n_jobs=-1,  # to debug, change to 1 for more informative error messages
        verbose=3)

evaluation_period = EvaluationPeriodParam(
        cv_max_splits=0, 
    )
        
result = forecaster.run_forecast_config(
        df=data_frame,
        config=ForecastConfig(
              # uses the SILVERKITE model template parameters
              model_template=ModelTemplateEnum.SILVERKITE.name,
              forecast_horizon=365, # forecasts 365 steps ahead
              coverage=0.95, # 95% prediction intervals
              metadata_param=metadata,
              evaluation_period_param=evaluation_period,
              computation_param=computation
)
)

Also, the training time does not scale linearly with input data points. e.g. with 3 years of input data, the training time does not increase 3 times.

from greykite.

lrosariov avatar lrosariov commented on July 20, 2024

Thanks for the quick reply! I have a big cpu cluster setup and it uses all available cores when computing the forecast so that seems to be working as expected. With parallel and removing CV it reduces it but still takes about 6 seconds. What is the typical time for predictions you see in general for Greykite/Silverkite? Is it always in the seconds?

from greykite.

sayanpatra avatar sayanpatra commented on July 20, 2024

Great, you can optimize the total runtime by experimenting with parallelization of Silverkite CV and the total number of time series you want to forecast.

For a single time series, the runtime depends on the amount of training data, forecast horizon and the number of CV splits, but it is in seconds. Silverkite's runtime is comparable to Auto-Arima (Table 1 here ) while providing additional features (e.g. holiday effects). Let us know if you found another library suitable for your use case.

from greykite.

lrosariov avatar lrosariov commented on July 20, 2024

Gotcha. We are trying to predict a big number of time series in a short amount of time so that's why execution time is very important. I will keep tweaking and exploring. Thanks for the quick response and the guidance.

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.