Skip to content

Commit c429e12

Browse files
committed
Deployed 4d9e490 to 5.0 with MkDocs 1.6.0 and mike 2.1.2
1 parent 06a3763 commit c429e12

9 files changed

Lines changed: 328 additions & 69 deletions

File tree

5.0/api/base_experiment/index.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2192,7 +2192,14 @@ <h4 id="scoreparams"><code>score(params)</code></h4>
21922192
<h4 id="paramnames"><code>paramnames()</code></h4>
21932193
<p>Get the parameter names for the search space.</p>
21942194
<p><strong>Returns:</strong>
2195-
- <code>list</code>: List of parameter names</p>
2195+
- <code>list[str] | None</code>: Parameter names. If <code>None</code>, any parameter keys are accepted.</p>
2196+
<p>Notes:
2197+
- When <code>paramnames()</code> returns a list, <code>params</code> passed to <code>evaluate/score</code> must be a subset of that list; otherwise a <code>ValueError</code> is raised.
2198+
- <code>__call__(params)</code> is provided as shorthand for <code>score(params)</code> and returns only the score (float).
2199+
- Score sign follows the tag <code>property:higher_or_lower_is_better</code>:
2200+
- <code>"higher"</code>: score equals evaluate (higher-is-better)
2201+
- <code>"lower"</code>: score is <code>-evaluate</code> (converted to higher-is-better)
2202+
- <code>"mixed"</code>: not supported by default; override <code>score</code> for custom behavior</p>
21962203
<h3 id="tags-system">Tags System</h3>
21972204
<p>BaseExperiment uses tags to specify optimization properties:</p>
21982205
<h3 id="abstract-methods">Abstract Methods</h3>

5.0/api/optimizers/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2415,7 +2415,7 @@ <h3 id="optuna-backend">Optuna Backend</h3>
24152415
<p>The Optuna backend provides 8 modern optimization algorithms with advanced features like multi-objective optimization.</p>
24162416
<p><strong>Import from:</strong> <code>hyperactive.opt.optuna</code> (also re-exported in <code>hyperactive.opt</code>)</p>
24172417
<h3 id="scikit-learn-backend">Scikit-learn Backend</h3>
2418-
<p>Direct integration with scikit-learn's optimization tools for familiar workflows.</p>
2418+
<p>Sklearn-style search using <code>ParameterGrid</code> / <code>ParameterSampler</code>, with evaluation handled by Hyperactive experiments.</p>
24192419
<p><strong>Import from:</strong> <code>hyperactive.opt.gridsearch</code> and <code>hyperactive.opt</code></p>
24202420
<h2 id="gradient-free-optimizers-backend">Gradient-Free-Optimizers Backend</h2>
24212421
<h3 id="hill-climbing-variants">Hill Climbing Variants</h3>
@@ -2507,11 +2507,11 @@ <h4 id="nsgaiiioptimizer">NSGAIIIOptimizer</h4>
25072507
<h3 id="qmcoptimizer">QMCOptimizer</h3>
25082508
<p>Quasi-Monte Carlo sampling.</p>
25092509
<h2 id="scikit-learn-backend_1">Scikit-learn Backend</h2>
2510-
<p>Direct integration with scikit-learn optimization tools.</p>
2510+
<p>Sklearn-style search; not thin wrappers over sklearn CV utilities. Evaluation is performed by a <code>SklearnCvExperiment</code> and parallelization by Hyperactive backends.</p>
25112511
<h3 id="gridsearchsk">GridSearchSk</h3>
2512-
<p>Direct sklearn GridSearchCV integration.</p>
2512+
<p>Sklearn-style exhaustive grid evaluation (evaluation via <code>SklearnCvExperiment</code>).</p>
25132513
<h3 id="randomsearchsk">RandomSearchSk</h3>
2514-
<p>Direct sklearn RandomizedSearchCV integration.</p>
2514+
<p>Sklearn-style randomized search (evaluation via <code>SklearnCvExperiment</code>).</p>
25152515
<h2 id="choosing-the-right-algorithm">Choosing the Right Algorithm</h2>
25162516
<h3 id="for-quick-prototyping">For Quick Prototyping</h3>
25172517
<ul>

5.0/experiments/custom_experiments/index.html

Lines changed: 94 additions & 0 deletions
Large diffs are not rendered by default.

5.0/index.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1951,6 +1951,13 @@ <h2 id="installation">Installation</h2>
19511951
<p>The most recent version of Hyperactive is available on PyPi:</p>
19521952
<div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="go">pip install hyperactive</span>
19531953
</code></pre></div>
1954+
<p>Optional integrations and backends:</p>
1955+
<ul>
1956+
<li>Optuna adapters: <code>pip install optuna&lt;5</code></li>
1957+
<li>Sktime integrations: <code>pip install hyperactive[sktime-integration]</code></li>
1958+
<li>Parallel backends (as needed): <code>pip install joblib dask ray</code></li>
1959+
<li>Note: ray support depends on your Python version; see <code>pyproject.toml</code> constraints.</li>
1960+
</ul>
19541961
<h2 id="quick-start">Quick Start</h2>
19551962
<h2 id="key-features_1">Key Features</h2>
19561963
<h3 id="complete-architecture-design">Complete Architecture Design</h3>

5.0/optimizers/optuna/gp_optimizer/index.html

Lines changed: 47 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,9 +1285,9 @@
12851285
<ul class="md-nav__list">
12861286

12871287
<li class="md-nav__item">
1288-
<a href="#experiment" class="md-nav__link">
1288+
<a href="#common-via-base-optuna-adapter" class="md-nav__link">
12891289
<span class="md-ellipsis">
1290-
experiment
1290+
Common (via Base Optuna Adapter)
12911291
</span>
12921292
</a>
12931293

@@ -1303,9 +1303,18 @@
13031303
</li>
13041304

13051305
<li class="md-nav__item">
1306-
<a href="#acquisition_func" class="md-nav__link">
1306+
<a href="#deterministic_objective" class="md-nav__link">
13071307
<span class="md-ellipsis">
1308-
acquisition_func
1308+
deterministic_objective
1309+
</span>
1310+
</a>
1311+
1312+
</li>
1313+
1314+
<li class="md-nav__item">
1315+
<a href="#random_state" class="md-nav__link">
1316+
<span class="md-ellipsis">
1317+
random_state
13091318
</span>
13101319
</a>
13111320

@@ -2139,9 +2148,9 @@
21392148
<ul class="md-nav__list">
21402149

21412150
<li class="md-nav__item">
2142-
<a href="#experiment" class="md-nav__link">
2151+
<a href="#common-via-base-optuna-adapter" class="md-nav__link">
21432152
<span class="md-ellipsis">
2144-
experiment
2153+
Common (via Base Optuna Adapter)
21452154
</span>
21462155
</a>
21472156

@@ -2157,9 +2166,18 @@
21572166
</li>
21582167

21592168
<li class="md-nav__item">
2160-
<a href="#acquisition_func" class="md-nav__link">
2169+
<a href="#deterministic_objective" class="md-nav__link">
2170+
<span class="md-ellipsis">
2171+
deterministic_objective
2172+
</span>
2173+
</a>
2174+
2175+
</li>
2176+
2177+
<li class="md-nav__item">
2178+
<a href="#random_state" class="md-nav__link">
21612179
<span class="md-ellipsis">
2162-
acquisition_func
2180+
random_state
21632181
</span>
21642182
</a>
21652183

@@ -2385,23 +2403,32 @@ <h2 id="about-the-implementation">About the Implementation</h2>
23852403
- <strong>Principled exploration</strong>: Uses uncertainty to guide search
23862404
- <strong>Non-parametric</strong>: Adapts to complex function shapes</p>
23872405
<h2 id="parameters">Parameters</h2>
2388-
<h3 id="experiment"><code>experiment</code></h3>
2406+
<h3 id="common-via-base-optuna-adapter">Common (via Base Optuna Adapter)</h3>
23892407
<ul>
2390-
<li><strong>Type</strong>: <code>BaseExperiment</code></li>
2391-
<li><strong>Description</strong>: The experiment object defining the optimization problem</li>
2408+
<li><code>param_space</code> (dict): parameter space; tuples/lists treated as ranges/choices</li>
2409+
<li><code>n_trials</code> (int): number of trials to run</li>
2410+
<li><code>initialize</code> (dict | None): optional warm start/grid/vertices/random init</li>
2411+
<li><code>early_stopping</code> (int | None): stop if no improvement after N trials</li>
2412+
<li><code>max_score</code> (float | None): stop when reaching threshold</li>
2413+
<li><code>experiment</code> (BaseExperiment): the experiment to optimize</li>
23922414
</ul>
23932415
<h3 id="n_startup_trials"><code>n_startup_trials</code></h3>
23942416
<ul>
23952417
<li><strong>Type</strong>: <code>int</code></li>
23962418
<li><strong>Default</strong>: <code>10</code></li>
23972419
<li><strong>Description</strong>: Number of random trials before GP optimization starts</li>
23982420
</ul>
2399-
<h3 id="acquisition_func"><code>acquisition_func</code></h3>
2421+
<h3 id="deterministic_objective"><code>deterministic_objective</code></h3>
24002422
<ul>
2401-
<li><strong>Type</strong>: <code>str</code></li>
2402-
<li><strong>Default</strong>: <code>"ei"</code> (Expected Improvement)</li>
2403-
<li><strong>Options</strong>: <code>"ei"</code>, <code>"lcb"</code> (Lower Confidence Bound), <code>"pi"</code> (Probability of Improvement)</li>
2404-
<li><strong>Description</strong>: Acquisition function for selecting next evaluation point</li>
2423+
<li><strong>Type</strong>: <code>bool</code></li>
2424+
<li><strong>Default</strong>: <code>False</code></li>
2425+
<li><strong>Description</strong>: Whether the objective function is deterministic (passes through to Optuna's GPSampler).</li>
2426+
</ul>
2427+
<h3 id="random_state"><code>random_state</code></h3>
2428+
<ul>
2429+
<li><strong>Type</strong>: <code>int | None</code></li>
2430+
<li><strong>Default</strong>: <code>None</code></li>
2431+
<li><strong>Description</strong>: Seed for reproducibility (sets <code>seed</code> in the underlying GPSampler).</li>
24052432
</ul>
24062433
<h2 id="usage-example">Usage Example</h2>
24072434
<h2 id="when-to-use-gp-optimizer">When to Use GP Optimizer</h2>
@@ -2417,24 +2444,13 @@ <h2 id="when-to-use-gp-optimizer">When to Use GP Optimizer</h2>
24172444
- <strong>Very noisy objectives</strong>: More robust methods might be needed
24182445
- <strong>Cheap evaluations</strong>: Random search might be sufficient</p>
24192446
<h2 id="acquisition-functions">Acquisition Functions</h2>
2447+
<p>Note: The specific acquisition function is handled internally by the Optuna sampler used by this adapter and is not user-configurable via this API. The following concepts are provided for background only.</p>
24202448
<h3 id="expected-improvement-ei">Expected Improvement (EI)</h3>
2421-
<ul>
2422-
<li><strong>Best for</strong>: Balanced exploration-exploitation</li>
2423-
<li><strong>Formula</strong>: <span class="arithmatex">\(EI(x) = \sigma(x) \cdot \phi(Z) + (\mu(x) - f_{best}) \cdot \Phi(Z)\)</span></li>
2424-
<li><strong>Use when</strong>: General-purpose optimization</li>
2425-
</ul>
2449+
<p>Balanced exploration-exploitation using improvement probability and magnitude.</p>
24262450
<h3 id="lower-confidence-bound-lcb">Lower Confidence Bound (LCB)</h3>
2427-
<ul>
2428-
<li><strong>Best for</strong>: Conservative optimization with uncertainty consideration</li>
2429-
<li><strong>Formula</strong>: <span class="arithmatex">\(LCB(x) = \mu(x) - \kappa \cdot \sigma(x)\)</span></li>
2430-
<li><strong>Use when</strong>: You want to avoid risky evaluations</li>
2431-
</ul>
2451+
<p>Conservative trade-off between mean prediction and uncertainty.</p>
24322452
<h3 id="probability-of-improvement-pi">Probability of Improvement (PI)</h3>
2433-
<ul>
2434-
<li><strong>Best for</strong>: When you want high probability of improvement</li>
2435-
<li><strong>Formula</strong>: <span class="arithmatex">\(PI(x) = \Phi(\frac{\mu(x) - f_{best}}{\sigma(x)})\)</span></li>
2436-
<li><strong>Use when</strong>: Conservative improvement is preferred</li>
2437-
</ul>
2453+
<p>Focuses on points with high probability of improving over current best.</p>
24382454
<h2 id="advanced-usage">Advanced Usage</h2>
24392455
<h3 id="custom-acquisition-function">Custom Acquisition Function</h3>
24402456
<h3 id="startup-trials-tuning">Startup Trials Tuning</h3>

5.0/optimizers/optuna/tpe_optimizer/index.html

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,9 +1222,9 @@
12221222
<ul class="md-nav__list">
12231223

12241224
<li class="md-nav__item">
1225-
<a href="#experiment" class="md-nav__link">
1225+
<a href="#common-via-base-optuna-adapter" class="md-nav__link">
12261226
<span class="md-ellipsis">
1227-
experiment
1227+
Common (via Base Optuna Adapter)
12281228
</span>
12291229
</a>
12301230

@@ -1249,18 +1249,18 @@
12491249
</li>
12501250

12511251
<li class="md-nav__item">
1252-
<a href="#gamma" class="md-nav__link">
1252+
<a href="#weights" class="md-nav__link">
12531253
<span class="md-ellipsis">
1254-
gamma
1254+
weights
12551255
</span>
12561256
</a>
12571257

12581258
</li>
12591259

12601260
<li class="md-nav__item">
1261-
<a href="#prior_weight" class="md-nav__link">
1261+
<a href="#random_state" class="md-nav__link">
12621262
<span class="md-ellipsis">
1263-
prior_weight
1263+
random_state
12641264
</span>
12651265
</a>
12661266

@@ -2046,9 +2046,9 @@
20462046
<ul class="md-nav__list">
20472047

20482048
<li class="md-nav__item">
2049-
<a href="#experiment" class="md-nav__link">
2049+
<a href="#common-via-base-optuna-adapter" class="md-nav__link">
20502050
<span class="md-ellipsis">
2051-
experiment
2051+
Common (via Base Optuna Adapter)
20522052
</span>
20532053
</a>
20542054

@@ -2073,18 +2073,18 @@
20732073
</li>
20742074

20752075
<li class="md-nav__item">
2076-
<a href="#gamma" class="md-nav__link">
2076+
<a href="#weights" class="md-nav__link">
20772077
<span class="md-ellipsis">
2078-
gamma
2078+
weights
20792079
</span>
20802080
</a>
20812081

20822082
</li>
20832083

20842084
<li class="md-nav__item">
2085-
<a href="#prior_weight" class="md-nav__link">
2085+
<a href="#random_state" class="md-nav__link">
20862086
<span class="md-ellipsis">
2087-
prior_weight
2087+
random_state
20882088
</span>
20892089
</a>
20902090

@@ -2199,10 +2199,14 @@ <h2 id="about-the-implementation">About the Implementation</h2>
21992199
- <strong>Robust performance</strong>: Works well across many different optimization problems
22002200
- <strong>Sample efficient</strong>: Requires fewer evaluations than random search</p>
22012201
<h2 id="parameters">Parameters</h2>
2202-
<h3 id="experiment"><code>experiment</code></h3>
2202+
<h3 id="common-via-base-optuna-adapter">Common (via Base Optuna Adapter)</h3>
22032203
<ul>
2204-
<li><strong>Type</strong>: <code>BaseExperiment</code></li>
2205-
<li><strong>Description</strong>: The experiment object defining the optimization problem</li>
2204+
<li><code>param_space</code> (dict): parameter space; tuples/lists treated as ranges/choices</li>
2205+
<li><code>n_trials</code> (int): number of trials to run</li>
2206+
<li><code>initialize</code> (dict | None): optional warm start/grid/vertices/random init</li>
2207+
<li><code>early_stopping</code> (int | None): stop if no improvement after N trials</li>
2208+
<li><code>max_score</code> (float | None): stop when reaching threshold</li>
2209+
<li><code>experiment</code> (BaseExperiment): the experiment to optimize</li>
22062210
</ul>
22072211
<h3 id="n_startup_trials"><code>n_startup_trials</code></h3>
22082212
<ul>
@@ -2216,17 +2220,17 @@ <h3 id="n_ei_candidates"><code>n_ei_candidates</code></h3>
22162220
<li><strong>Default</strong>: <code>24</code></li>
22172221
<li><strong>Description</strong>: Number of candidate points to evaluate when computing Expected Improvement</li>
22182222
</ul>
2219-
<h3 id="gamma"><code>gamma</code></h3>
2223+
<h3 id="weights"><code>weights</code></h3>
22202224
<ul>
2221-
<li><strong>Type</strong>: <code>float</code></li>
2222-
<li><strong>Default</strong>: <code>0.25</code></li>
2223-
<li><strong>Description</strong>: Quantile for splitting observations into good/bad groups. Lower values create more selective "good" groups.</li>
2225+
<li><strong>Type</strong>: <code>callable | None</code></li>
2226+
<li><strong>Default</strong>: <code>None</code></li>
2227+
<li><strong>Description</strong>: Optional weighting function passed to Optuna's TPESampler.</li>
22242228
</ul>
2225-
<h3 id="prior_weight"><code>prior_weight</code></h3>
2229+
<h3 id="random_state"><code>random_state</code></h3>
22262230
<ul>
2227-
<li><strong>Type</strong>: <code>float</code></li>
2228-
<li><strong>Default</strong>: <code>1.0</code></li>
2229-
<li><strong>Description</strong>: Prior weight for the Parzen estimators</li>
2231+
<li><strong>Type</strong>: <code>int | None</code></li>
2232+
<li><strong>Default</strong>: <code>None</code></li>
2233+
<li><strong>Description</strong>: Seed for reproducibility (sets <code>seed</code> in the underlying TPESampler).</li>
22302234
</ul>
22312235
<h2 id="usage-example">Usage Example</h2>
22322236
<h2 id="when-to-use-tpe">When to Use TPE</h2>

5.0/optimizers/sklearn/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,14 +1827,15 @@
18271827

18281828

18291829
<h1 id="scikit-learnstyled-optimizers">Scikit-learn–Styled Optimizers</h1>
1830-
<p>Hyperactive provides scikit-learn–styled optimizers that use sklearn-style parameter grids and distributions while running through Hyperactive’s optimization and experiment abstractions. These are designed for users who prefer sklearn-like configuration but want to stay within the Hyperactive v5 architecture.</p>
1830+
<p>Hyperactive provides sklearn-style search using <code>ParameterGrid</code> / <code>ParameterSampler</code>, with evaluation routed through Hyperactive experiments. This preserves familiar configuration while keeping the v5 architecture’s separation between search (optimizer) and evaluation (experiment).</p>
18311831
<p>Key characteristics:</p>
18321832
<ul>
18331833
<li>Sklearn-style search spaces via <code>ParameterGrid</code> / <code>ParameterSampler</code></li>
18341834
<li>Evaluation via a Hyperactive <code>Experiment</code> (typically <code>SklearnCvExperiment</code>)</li>
1835-
<li>Parallelism via Hyperactive backends (<code>backend</code>, <code>backend_params</code>)</li>
1835+
<li>Parallelism via optimizer backends (<code>backend</code>, <code>backend_params</code>)</li>
18361836
<li>Results exposed on the optimizer (<code>best_params_</code>, <code>best_score_</code>, etc.)</li>
18371837
</ul>
1838+
<p>Note: These are not thin wrappers over <code>GridSearchCV</code> / <code>RandomizedSearchCV</code>. Cross‑validation is handled by the experiment (<code>SklearnCvExperiment</code>), and parallelization is controlled by Hyperactive’s backends.</p>
18381839

18391840

18401841

0 commit comments

Comments
 (0)