least_squares module
Define LeastSquares, a simple and fast optimisation method.
- class LeastSquares(*args, **kwargs)
Bases:
OptimisationAlgorithmPlain least-squares method, efficient for small problems.
Notes
Works very well with
Envelope1D, has issues converging withTraceWin.All the attributes but
solutionare inherited from the Abstract Base ClassOptimisationAlgorithm.See also
- optimise(keep_history: bool = False, save_history: bool = False) tuple[bool, SetOfCavitySettings | None, OptiInfo]
Set up the optimisation and solve the problem.
- Returns:
success (bool) – Tells if the optimisation algorithm managed to converge.
optimized_cavity_settings (SetOfCavitySettings) – Best solution found by the optimization algorithm.
info (dict[str, list[float]]] | None) – Gives list of solutions, corresponding objective, convergence violation if applicable, etc.
- _output_some_info(objectives_values: dict[str, float]) None
Show the most useful data from scipy’s
least_squares.
- _abc_impl = <_abc._abc_data object at 0x7fd3c81273c0>