uclamii / model_tuner

A library to tune the hyperparameters of common ML models. Supports calibration and custom pipelines.
Apache License 2.0
3 stars 0 forks source link

Merging Set up and Bayesian CV + feature_names removal + xgboost_early renamed #61

Closed elemets closed 1 month ago

elemets commented 1 month ago

[PR] Add Bayesian Search to Model Tuner with Support for Python 3.7 - 3.11

Overview

This pull request introduces support for Bayesian Search in model_tuner, along with updates to compatibility across Python versions 3.7 to 3.11. The update was initially contributed by @lshpaner, and we've now expanded it to also support scikit-optimize, allowing the use of BayesSearchCV for more efficient hyperparameter tuning.

Key Changes

Enable Bayesian Search for Cross-Validation

To run the Bayesian search, set the bayesian and kfold variables in the model definition to True. This ensures that the Bayesian search operates within cross-validation.

Minor Bug Fixes

We have removed the unused variable feature_names and we have renamed xgboost_early to boost_early to make it a more general variable name.

lshpaner commented 1 month ago

Approved. The addition of Bayesian Search with compatibility updates across Python 3.7-3.11 and integration with scikit-optimize significantly enhances the functionality and flexibility of model_tuner. The inclusion of BayesSearchCV for hyperparameter tuning and minor bug fixes contribute to a more robust tool. Great work on expanding the feature set while ensuring cross-version stability.