specular.optimization
Composable direction rules, step size rules, and an iteration wrapper for scalar or vector optimization. SPEG combines the normalized negative specular gradient with a step size rule.
| Function or class | Description |
|---|---|
specular_gradient |
Run SPEG with a selected step size rule. |
minimize |
Combine a direction and a step size rule in one solver. |
make_direction |
Create a SPEG or custom direction callable. |
make_step_size |
Create a schedule or a bounded line search. |
OptimizationResult |
Inspect the accepted solution, history, and stopping reason. |
LineSearchError |
Identify a search that could not accept a step. |
For worked examples, step size formulas, and the distinction between classical and specular search derivatives, see the optimization user guide.
The optimizer uses the selected calculation backend for numerical specular differentiation, with an eager Python loop and NumPy state.