minimize
- pmrf.optimize.minimize(objective: Callable[[ModelT, Frequency], Array] | list[Callable], model: ModelT, frequency: Frequency, solver: AbstractUnconstrainedMinimizer | AbstractBoundedMinimizer = ScipyMinimize(options={}), max_iter: int | None = 1024, search_space: str | None = None, **kwargs) OptimizeResult[ModelT]
Minimizes a given objective function for a model over a frequency range.
The objective function can have its own hyper-parameters, and is returned in result.objective.
- Parameters:
objective (Callable[[Model, Frequency], jnp.ndarray] | list[Callable],) – The objective function to minimize. Can be a function or a callable PyTree with optional parameters. If a list of objectives is provided, they are automatically summed. See
pmrf.evaluators.Goal()for an easy way to define goal-based objectives.model (Model) – The RF model containing the parameters to be optimized. If the parameters contain bounds and the optimizer supports bounds, these bounds are used in a bounded optimization. Otherwise, the bounds are enforced via space transformations (bijectors). If the parameters do not contain bounds, their limits are set to infinity.
frequency (Frequency) – The frequency sweep over which the objective should be evaluated.
solver (pmrf.optimize.AbstractMinimizer, default=ScipyMinimize()) – The optimizer to use. See
pmrf.optimizefor available solvers.max_iter (int) – The maximum number of iterations to take.
search_space (str, optional) – The optimization search space. Currently ignored, provided for future compatibility.
**kwargs – Additional arguments to forward to parax.optimize.minimize.
- Returns:
A structured result containing the fitted model and solver statistics.
- Return type: