autoemulate.core.compare#
- class AutoEmulate(x, y, models=None, x_transforms_list=None, y_transforms_list=None, model_tuning=True, model_kwargs=None, n_iter=10, n_splits=5, shuffle=True, n_bootstraps=100, max_retries=3, device=None, random_seed=None, log_level='progress_bar')[source]#
Bases:
ConversionMixin
,TorchDeviceMixin
,Results
Automated emulator fitting.
The AutoEmulate class is the main class of the AutoEmulate package. It is used to set up and compare different emulator models on a given dataset. It can also be used to summarise and visualise results, and to save and load models.
- static list_emulators()[source]#
Return a dataframe with model names of all available emulators.
- Returns:
DataFrame with columns [‘model_name’, ‘short_name’].
- Return type:
pd.DataFrame
- filter_models_if_multioutput(models, warn)[source]#
Filter models to only include those that support multi-output data.
- log_compare(best_model_name, x_transforms, y_transforms, best_params_for_this_model, r2_score, rmse_score)[source]#
Log the comparison results.
- compare()[source]#
Compare different models on the provided dataset.
The method will: - Loop over all combinations of x and y transforms and models. - Set up the tuner with the training/validation data. - Tune hyperparameters for each model. - Fit the best model with the tuned hyperparameters. - Evaluate the performance of the best model on the test data. - Log the results. - Save the best model and its parameters.
- plot(model_obj, input_index=None, output_index=None, figsize=None, n_cols=3)[source]#
Plot the evaluation of the model with the given result_id.
- Parameters: