Skip to main content
NeuralForecast contains two main components, PyTorch implementations deep learning predictive models, as well as parallelization and distributed computation utilities. The first component comprises low-level PyTorch model estimator classes like models.NBEATS and models.RNN. The second component is a high-level core.NeuralForecast wrapper class that operates with sets of time series data stored in pandas DataFrames.

NeuralForecast

The core.StatsForecast class allows you to efficiently fit multiple NeuralForecast models for large sets of time series. It operates with a pandas DataFrame df that identifies series and datestamps with the unique_id and ds columns. The y column denotes the target time series variable. Parameters: Returns:

NeuralForecast.fit

Fit the core.NeuralForecast Fit models to a large set of time series from DataFrame df and store fitted models for later inspection. Parameters: Returns:

NeuralForecast.predict

Predict with core.NeuralForecast. Use stored fitted models to predict large set of time series from DataFrame df. Parameters: Returns:

NeuralForecast.cross_validation

Temporal Cross-Validation with core.NeuralForecast. core.NeuralForecast’s cross-validation efficiently fits a list of NeuralForecast models through multiple windows, in either chained or rolled manner. Parameters: Returns:

NeuralForecast.predict_insample

Predict insample with core.NeuralForecast. core.NeuralForecast’s predict_insample uses stored fitted models to predict historic values of a time series from the stored dataframe. Parameters: Returns:

NeuralForecast.save

Save NeuralForecast core class. core.NeuralForecast’s method to save current status of models, dataset, and configuration. Note that by default the models are not saving training checkpoints to save disk memory, to get them change the individual model **trainer_kwargs to include enable_checkpointing=True. Parameters:

NeuralForecast.load

Load NeuralForecast core.NeuralForecast’s method to load checkpoint from path. Parameters: Returns: