0.6.0
This is a big release with several new features and enhancements! 🎊
Features:
-
Added the
ProgressBar
callback, it uses tqdm progress bar to shows how many generations are left in the training progress. -
Added the
TensorBoard
callback to log the generation metrics, watch in real-time while the models are trained, and compare different runs in your TensorBoard instance. -
Added the
TimerStopping
callback to stop the iterations after a total (threshold) fitting time has been elapsed. -
Added new parallel coordinates plot using
plot_parallel_coordinates
by @Raul9595 -
Now if one or more callbacks decides to stop the algorithm, it will print its class name to know which callbacks were responsible of the stopping.
-
Added support for extra methods coming from scikit-learn's BaseSearchCV, like
cv_results_
,
best_index_
andrefit_time_
among others. -
Added methods
on_start
andon_end
toBaseCallback
. Now the algorithms check for the callbacks like this:-
on_start: When the evolutionary algorithm is called from the GASearchCV.fit method.
-
on_step: When the evolutionary algorithm finishes a generation (no change here).
-
on_end: At the end of the last generation.
-
Bug Fixes:
- A missing statement was making that the callbacks start to get evaluated from generation 1, ignoring generation 0. Now this is properly handled and callbacks work from generation 0.
API Changes:
- The modules
sklearn_genetic.plots
andsklearn_genetic.mlflow.MLflowConfig
now requires an explicit installation of seaborn and mlflow, now those are optionally installed usingpip install sklearn-genetic-opt[all].
- The GASearchCV.logbook property now has extra information that comes from the scikit-learn cross_validate function.
- An optional extra parameter was added to GASearchCV, named
return_train_score
: bool, default=False. As in scikit-learn, it controls if thecv_results_
should have the training scores.
Docs:
- Edited all demos to be in the jupyter notebook format.
- Added embedded jupyter notebooks examples in read the docs page.
- The modules of the package now have a summary of their classes/functions in the docs.
- Updated the callbacks and custom callbacks tutorials to add a new TensorBoard callback and the new methods on the base callback.
Internal:
- Now the HallofFame (hof) uses the
self.best_params_
for the position 0, to be consistent with the
scikit-learn API and parameters likeself.best_index_
- MLflow now has unit tests by @Turtle24
Thanks to new contributors for helping in this project! @Raul9595 @Turtle24