from spotforecast2.manager.multitask import SpotOptimTask
task = SpotOptimTask(n_trials_spotoptim=10, predict_size=24)
print(f"Task: {task.TASK}")
print(f"SpotOptim trials: {task.config.n_trials_spotoptim}")Task: spotoptim
SpotOptim trials: 10
manager.multitask.SpotOptimTask(
dataframe=None,
data_test=None,
data_frame_name='default',
cache_home=None,
agg_weights=None,
index_name='DateTime',
number_folds=10,
predict_size=24,
bounds=None,
contamination=0.03,
imputation_method='weighted',
use_exogenous_features=True,
n_trials_optuna=15,
n_trials_spotoptim=10,
n_initial_spotoptim=5,
auto_save_models=True,
train_days=365 * 2,
val_days=7 * 2,
log_level=logging.INFO,
verbose=False,
**config_overrides,
)Task 4 — SpotOptim surrogate-model Bayesian tuning.
Uses spotoptim for surrogate-model-based Bayesian optimisation. Effective with small trial budgets.
| Name | Description |
|---|---|
| run | Run SpotOptim surrogate-model tuning for all targets. |
Run SpotOptim surrogate-model tuning for all targets.
| Name | Type | Description | Default |
|---|---|---|---|
| show | bool | If True, display prediction figures. |
True |
| search_space | Optional[Dict[str, Any]] | Dictionary defining the SpotOptim search space. None uses the built-in default. |
None |
| Name | Type | Description |
|---|---|---|
| Dict[str, Any] | Aggregated prediction package. Per-target packages are stored | |
| Dict[str, Any] | on self.results["spotoptim"]. |