1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! Multi-fidelity optimization: Hyperband and Successive Halving.
//!
//! This module provides resource-efficient hyperparameter optimization via
//! early-stopping strategies.
//!
//! - [`SuccessiveHalving`] allocates a fixed budget across configurations and
//! iteratively discards the worst performers.
//! - [`Hyperband`] runs multiple brackets of Successive Halving with varying
//! aggressiveness to hedge against the unknown ideal trade-off.
//!
//! # Quick start
//!
//! ```rust
//! use scirs2_optimize::multi_fidelity::{
//! Hyperband, MultiFidelityConfig, ConfigSampler,
//! };
//!
//! let config = MultiFidelityConfig {
//! max_budget: 81.0,
//! min_budget: 1.0,
//! eta: 3,
//! ..Default::default()
//! };
//!
//! let hb = Hyperband::new(config).expect("valid config");
//! let bounds = vec![(-5.0, 5.0), (-5.0, 5.0)];
//! let mut rng = 42u64;
//!
//! let result = hb.run(
//! &|x: &[f64], _budget: f64| Ok(x.iter().map(|v| v * v).sum()),
//! &bounds,
//! &ConfigSampler::Random,
//! &mut rng,
//! ).expect("optimization ok");
//!
//! println!("Best: {:?} -> {:.6}", result.best_config, result.best_objective);
//! ```
// Re-exports
pub use Hyperband;
pub use SuccessiveHalving;
pub use ;