pycaret.time_series.get_config#
- pycaret.time_series.get_config(variable: str | None = None)[source]#
This function retrieves the global variables created when initializing the
setupfunction. Following variables are accessible:X: Period/Index of X
y: Time Series as pd.Series
X_train: Period/Index of X_train
y_train: Time Series as pd.Series (Train set only)
X_test: Period/Index of X_test
y_test: Time Series as pd.Series (Test set only)
fh: forecast horizon
enforce_pi: enforce prediction interval in models
seed: random state set through session_id
prep_pipe: Transformation pipeline
n_jobs_param: n_jobs parameter used in model training
html_param: html_param configured through setup
_master_model_container: model storage container
_display_container: results display container
exp_name_log: Name of experiment
logging_param: log_experiment param
log_plots_param: log_plots param
USI: Unique session ID parameter
data_before_preprocess: data before preprocessing
gpu_param: use_gpu param configured through setup
fold_generator: CV splitter configured in fold_strategy
fold_param: fold params defined in the setup
seasonality_present: seasonality as detected in the setup
seasonality_period: seasonality_period as detected in the setup
Example
>>> from pycaret.datasets import get_data >>> airline = get_data('airline') >>> from pycaret.time_series import * >>> exp_name = setup(data = airline, fh = 12) >>> X_train = get_config('X_train')
- variablestr, default = None
Name of the variable to return the value of. If None, will return a list of possible names.
- Returns:
Global variable