Expand description
Model-Based Black-Box Optimization.
Provides surrogate-model-driven optimization using ensembles of decision trees (Random Forest) as the surrogate model. Unlike GP-based methods, tree ensembles scale more gracefully to moderate-dimensional problems and do not require careful kernel design.
§Contents
RandomForestSurrogate– ensemble of regression trees, exposesfitandpredict(mean + uncertainty from tree variance).ei_random_forest– Expected Improvement acquisition function for the RF surrogate.SmacOptimizer– Sequential Model-based Algorithm Configuration (SMAC) loop, which alternates between local and random search phases.
§Quick Start
use scirs2_optimize::blackbox::model_based::{
SmacOptimizer, SmacConfig,
};
let bounds = vec![(-5.0_f64, 5.0_f64), (-5.0, 5.0)];
let config = SmacConfig { n_initial: 6, n_iterations: 20, seed: Some(42),
..Default::default() };
let mut smac = SmacOptimizer::new(bounds, config).expect("build smac");
let result = smac.optimize(|x: &[f64]| x[0].powi(2) + x[1].powi(2), 20)
.expect("optimize");
println!("Best: {:?} f={:.4}", result.x_best, result.f_best);Structs§
- Random
Forest Surrogate - Random Forest surrogate for black-box optimization.
- Smac
Config - Configuration for the SMAC optimizer.
- Smac
Optimizer - SMAC: Sequential Model-based Algorithm Configuration.
- Smac
Result - Result of SMAC optimization.
Functions§
- ei_
random_ forest - Expected Improvement acquisition for a Random Forest surrogate.