ScipyOptimizer#
- class ScipyOptimizer(verbose=False, disable_tqdm=True, maxfun=200, **kwargs)[source]#
Class for the SciPy minimizer.
This class is a wrapper for the SciPy minimizer. It requires the following parameters to be set: - init initial values for each parameter - min and max bounds for each parameter
- verbose#
Whether to print the optimization progress.
- Type:
bool, default False
- disable_tqdm#
Whether to disable the tqdm progress bar.
- Type:
bool, default True
- maxfun#
Maximum number of function evaluations.
- Type:
int
- kwargs#
Additional keyword arguments for the SciPy minimizer. https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html
- Type:
dict[str, Any]
- minimize(func, init)[source]#
Minimize the given function using the SciPy minimize.
- Parameters:
func (callable) – The objective function to be minimized. The function should take a single argument, which is a NumPy array of type np.float64, and return a float value.
init (numpy.ndarray) – The initial point for the optimization algorithm. The array should have dtype np.float64.
- Returns:
A tuple containing the minimum function value and the corresponding optimal point.
- Return type:
tuple