2026-08-16 21:04:23 +03:00

23 lines
806 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# lawsynth-opt
Deterministic small-scale optimizers for calibrating candidate laws. It exposes
coordinate search, L-BFGS, Nelder–Mead, bounded affine least squares, and a
mixed strategy, all with explicit termination reasons.
## Use
```rust
use lawsynth_opt::{LbfgsConfig, ParameterBounds, lbfgs_minimize};
let result = lbfgs_minimize(
&[2.0], ParameterBounds::new(-10.0, 10.0)?, LbfgsConfig::default(),
|x| ((x[0] - 1.0).powi(2), vec![2.0 * (x[0] - 1.0)]),
)?;
assert!(result[0] > 0.9 && result[0] < 1.1);
# Ok::<(), lawsynth_opt::OptimizationError>(())
```
Objectives are caller-supplied and must be finite over their accepted domain.
This crate reports convergence or budget termination; it does not manufacture
gradients, enforce scientific identifiability, or replace model validation.