optimization.optimizer.scipy.least_squares
Classes
|
- class LeastSquares(problem: OptimizationProblem)[source]
- optimize(maxiter: int | None = None, disp: bool = False, plot: bool = False, tol: float = 0.001, callback: Any = None, method_choice: str = 'lm')[source]
Optimize the problem using a SciPy least squares method.
- Parameters:
max_nfev (int, optional) – Maximum number of function evaluations (NFEV). SciPy’s least_squares uses max_nfev.
disp (bool, optional) – Whether to display optimization progress.
plot – If True, update live plots during optimization.
tol (float, optional) – Tolerance for termination (ftol - tolerance for the change in the sum of squares). Defaults to 1e-3.
method_choice (str, optional) – Method for scipy.optimize.least_squares. ‘lm’: Levenberg-Marquardt (DLS, does not support bounds). ‘trf’: Trust Region Reflective (supports bounds). ‘dogbox’: Dogleg algorithm (supports bounds). Defaults to ‘lm’.
- undo()
Undo the last optimization step.