feat: v0.5.0 — comprehensive documentation release
Theme: documentation and project polish. No public-API changes; this is the v0.5 release that elevates heuropt's docs/onboarding/governance to bar-setting status. Adds: - mdbook user guide at docs/book/ with intro, getting-started, defining-problems, choosing-an-algorithm, cookbook (7 recipes), comparison vs other libraries, stability/SemVer, migration guides. Deploys to https://swaits.github.io/heuropt/ via .github/workflows/ docs.yml. - Runnable rustdoc examples on every algorithm (35 of them), all exercised by cargo test --doc. - Three real-world examples: portfolio.rs (multi-obj with budget constraint), hyperparam_tuning.rs (BO + TPE), scheduling.rs (permutation via SA + SwapMutation against Smith's-rule oracle). - Governance: CONTRIBUTING.md, SECURITY.md, CODE_OF_CONDUCT.md (adopting builderscode.org's Builder's Code of Conduct), GitHub issue templates, PR template. Polishes: - README hero with badges + user-guide link. - lib.rs crate-level docs. - CHANGELOG entry for 0.5.0. Bumps Cargo.toml to 0.5.0.
This commit is contained in:
@@ -52,6 +52,37 @@ impl Default for TpeConfig {
|
||||
/// `BayesianOpt`, no GP — TPE models `p(x | y < y*)` and `p(x | y >= y*)`
|
||||
/// as per-axis Gaussian KDEs and picks the next candidate by maximizing
|
||||
/// the ratio of the two densities.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// use heuropt::prelude::*;
|
||||
///
|
||||
/// struct Sphere;
|
||||
/// impl Problem for Sphere {
|
||||
/// type Decision = Vec<f64>;
|
||||
/// fn objectives(&self) -> ObjectiveSpace {
|
||||
/// ObjectiveSpace::new(vec![Objective::minimize("f")])
|
||||
/// }
|
||||
/// fn evaluate(&self, x: &Vec<f64>) -> Evaluation {
|
||||
/// Evaluation::new(vec![x.iter().map(|v| v * v).sum::<f64>()])
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// let mut opt = Tpe::new(
|
||||
/// TpeConfig {
|
||||
/// initial_samples: 10,
|
||||
/// iterations: 50,
|
||||
/// good_fraction: 0.25,
|
||||
/// candidate_samples: 24,
|
||||
/// bandwidth_factor: 1.0,
|
||||
/// seed: 42,
|
||||
/// },
|
||||
/// RealBounds::new(vec![(-3.0, 3.0); 3]),
|
||||
/// );
|
||||
/// let r = opt.run(&Sphere);
|
||||
/// assert_eq!(r.evaluations, 60);
|
||||
/// ```
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Tpe {
|
||||
/// Algorithm configuration.
|
||||
|
||||
Reference in New Issue
Block a user