macrosynergy.learning.forecasting.bootstrap.bootstrap#
- class BasePanelBootstrap(bootstrap_method='panel', resample_ratio=1, max_features=None)[source]#
Bases:
ABC
- create_bootstrap_dataset(X, y)[source]#
Generate a bootstrap dataset based on a panel of features and a dependent variable.
- Parameters:
X (pd.DataFrame) – Input feature matrix
y (pd.DataFrame or pd.Series) – Dependent variable.
- Returns:
X_resampled (pd.DataFrame) – Bootstrap resampled feature matrix.
y_resampled (pd.DataFrame or pd.Series) – Bootstrap resampled dependent variable.