Installation
Prerequisites
- Python ≥ 3.12
- pip or conda
pip
Install the core package:
bash
pip install sklearn-genetic-optInstall all optional extras (plotting, MLflow, TensorBoard):
bash
pip install sklearn-genetic-opt[all]Install individual extras:
bash
pip install sklearn-genetic-opt[plot] # seaborn for plot_fitness_evolution / plot_search_space
pip install sklearn-genetic-opt[mlflow] # MLflow 3 loggingconda
bash
conda install -c conda-forge sklearn-genetic-optThe conda package ships only the core dependencies. Install optional extras alongside it:
bash
conda install -c conda-forge sklearn-genetic-opt seaborn mlflowRequirements
| Package | Minimum version | Required |
|---|---|---|
| Python | 3.12 | Yes |
| scikit-learn | 1.5.0 | Yes |
| NumPy | 1.26.0 | Yes |
| pandas | 1.3.0 | Yes |
| DEAP | 1.4.0 | Yes |
| tqdm | 4.60.0 | Yes |
| Seaborn | 0.13.2 | No (plots) |
| MLflow | 3.14.0 | No (MLflow logging) |
| TensorFlow | 2.21.0 | No (TensorBoard logging, Python < 3.14) |
| TensorBoard | 2.20.0 | No (TensorBoard logging) |
Verify the installation
python
import sklearn_genetic
print(sklearn_genetic.__version__)Next Steps
- Basic Usage — start here if you're new to the library.
- When to Use — decide if GA search fits your problem.
