tabensemb.model.TorchModel.fit#

method

TorchModel.fit(df: DataFrame, cont_feature_names: List[str], cat_feature_names: List[str], label_name: List[str], model_subset: List[str] | None = None, derived_data: Dict[str, ndarray] | None = None, verbose: bool = True, warm_start: bool = False, bayes_opt: bool = False)#

Fit all models using a tabular dataset.

Parameters:
df:

A tabular dataset.

cont_feature_names:

The names of continuous features.

cat_feature_names:

The names of categorical features.

label_name:

The names of targets.

model_subset:

The names of a subset of all available models (in get_model_names()). Only these models will be trained.

derived_data:

Unstacked data derived from tabensemb.data.datamodule.DataModule.derive_unstacked(). If None, unstacked data will be re-derived.

verbose:

Verbosity.

warm_start:

Finetune models based on previous trained models.

bayes_opt:

Whether to perform Gaussian-process-based Bayesian Hyperparameter Optimization for each model.

Notes

The loaded dataset in the linked Trainer will be replaced.