pycaret.time_series.load_experiment#
- pycaret.time_series.load_experiment(path_or_file: str | PathLike | BinaryIO, data: Series | DataFrame | None = None, data_func: Callable[[], Series | DataFrame] | None = None, test_data: Series | DataFrame | None = None, preprocess_data: bool = True, **cloudpickle_kwargs) TSForecastingExperiment[source]#
Load an experiment saved with
save_experimentfrom path or file.The data (and test data) is NOT saved with the experiment and will need to be specified again.
- path_or_file: str or BinaryIO (file pointer)
The path/file pointer to load the experiment from. The pickle file must be created through
save_experiment.- data: pandas.Series or pandas.DataFrame
Data set with shape (n_samples, n_features), where n_samples is the number of samples and n_features is the number of features. If data is not a pandas dataframe, it’s converted to one using default column names.
- data_func: Callable[[], pandas.Series or pandas.DataFrame] = None
The function that generate
data(the dataframe-like input). This is useful when the dataset is large, and you need parallel operations such ascompare_models. It can avoid broadcasting large dataset from driver to workers. Notice one and only one ofdataanddata_funcmust be set.- test_data: pandas.Series or pandas.DataFrame or None, default = None
If not None, test_data is used as a hold-out set and train_size parameter is ignored. The columns of data and test_data must match.
- preprocess_data: bool, default = True
If True, the data will be preprocessed again (through running
setupinternally). If False, the data will not be preprocessed. This means you can save the value of thedataattribute of an experiment separately, and then load it separately and pass it here withpreprocess_dataset to False. This is an advanced feature. We recommend leaving it set to True and passing the same data as passed to the initialsetupcall.- **cloudpickle_kwargs:
Kwargs to pass to the
cloudpickle.loadcall.
- Returns:
loaded experiment