Skip to main content

evo-hp - Evolutionary Hyperparameter Optimizer

PyPI Python versions Docs CI License: MIT

A scikit-learn-compatible hyperparameter optimizer for tabular data, powered by DEAP. evo-hp tunes the hyperparameters of any scikit-learn estimator with a Genetic Algorithm over mixed search spaces (integers, floats, log-scale, categoricals, booleans and conditional parameters), complementing evo-gafs (feature selection) and evo-gpfe (feature engineering) upstream, and evo-ens (ensemble construction) downstream.

Part of the evo-suite family (import name: evo_hp). Documentation: https://evo-suite.readthedocs.io/

Why evo-hp?

Capability evo-hp
Mixed search spaces natively: int, float (linear/log-scale), categorical, boolean, conditional Yes
Uniform [0, 1]^n gene representation: standard DEAP operators (cxUniform, mutGaussian) across every type Yes
Evaluation cache keyed on decoded hyperparameters — population convergence becomes cheap cache hits Yes
Native scikit-learn EvoHPClassifier / EvoHPRegressor, usable in a Pipeline and tunable with GridSearchCV Yes
Multi-objective NSGA-II mode exposing the full score/complexity Pareto front Yes
13 built-in predefined search spaces (RandomForest, GradientBoosting, SVC/SVR, LogisticRegression, Ridge, Lasso, ElasticNet, KNN, DecisionTree) Yes
Built-in multi-estimator EvoHPBenchmarkRunner Yes

Installation

pip install evo-hp            # core
pip install "evo-hp[viz]"     # + matplotlib for the plotting helpers

Quickstart

from sklearn.datasets import load_breast_cancer
from sklearn.ensemble import RandomForestClassifier
from evo_hp import EvoHPClassifier, EvoHPConfig

X, y = load_breast_cancer(return_X_y=True, as_frame=True)

clf = EvoHPClassifier(
    estimator=RandomForestClassifier(random_state=42),
    param_space="rf_clf",
    config=EvoHPConfig(population_size=40, n_generations=30, verbose=False),
)
clf.fit(X, y)

print(clf.result_.summary())
print(clf.best_params_)

EvoHPRegressor follows the same API for regression targets, scoring with R² by default. Define a custom search space with Int/Float/Cat/ Bool/Cond instead of a predefined name for full control:

from sklearn.svm import SVC
from evo_hp import EvoHPClassifier, Float, Cat, Cond, Int

space = [
    Float("C", 0.001, 1000.0, log=True),
    Cat("kernel", ["rbf", "linear", "poly", "sigmoid"]),
    Float("gamma", 1e-5, 10.0, log=True),
    Cond("degree", Int("degree", 2, 5), "kernel", ["poly"], default=3),
]
clf = EvoHPClassifier(estimator=SVC(max_iter=10_000), param_space=space)

Since evo-hp does not transform X, it slots in naturally as the final step of a Pipeline — including right after evo-gafs's feature selector, mirroring the suite's intended pipeline position (evoimp -> gpfe -> gafs -> evohp -> evoens):

from sklearn.pipeline import Pipeline
from evo_gafs import GAFeatureSelector
from evo_hp import EvoHPClassifier

pipe = Pipeline([
    ("select", GAFeatureSelector(estimator=RandomForestClassifier(random_state=42))),
    ("tune", EvoHPClassifier(estimator=RandomForestClassifier(random_state=42), param_space="rf_clf")),
])
pipe.fit(X, y)

Documentation & examples

Citation

@software{evo_hp,
  author    = {Skrauba, Axel},
  title     = {evo-hp: Evolutionary Hyperparameter Optimizer for tabular data},
  year      = {2026},
  version   = {0.1.0},
  url       = {https://github.com/AxelSkrauba/evo-suite}
}

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

evo_hp-0.1.0.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

evo_hp-0.1.0-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

Details for the file evo_hp-0.1.0.tar.gz.

File metadata

  • Download URL: evo_hp-0.1.0.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for evo_hp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 82fa321203d5f76f4b59273b0ae39f3c6cd36e8e8faaf02d5330defd083decec
MD5 71c7dc038c13395a2e99d12c23c9c14f
BLAKE2b-256 69c5ad72ca6ae2d4a409344e6f843486574351f5daa7c068b063d9e14ffa0cbb

See more details on using hashes here.

Provenance

The following attestation bundles were made for evo_hp-0.1.0.tar.gz:

Publisher: publish.yml on AxelSkrauba/evo-suite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file evo_hp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: evo_hp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 28.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for evo_hp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b5f380dc1c12d611b822f1bd5fb411bc961894ac7426f05a99caf8049eef8d92
MD5 12cc633e239c7a5485d9cec592640785
BLAKE2b-256 060194c15ea231308bebaaa375988a0f0bac11c6ebe5e06b25c9506c0508e1f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for evo_hp-0.1.0-py3-none-any.whl:

Publisher: publish.yml on AxelSkrauba/evo-suite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page