Optimizer
- class glotaran.optimization.optimizer.Optimizer(scheme: Scheme, verbose: bool = True, raise_exception: bool = False)[source]
Bases:
object
A class to optimize a scheme.
Initialize an optimization group for a dataset group.
- Parameters:
- Raises:
MissingDatasetsError – Raised if datasets are missing.
ParameterNotInitializedError – Raised if the scheme parameters are None.
UnsupportedMethodError – Raised if the optimization method is unsupported.
Methods Summary
Calculate the covariance matrix and standard errors of the optimization.
Calculate the penalty of the scheme.
Create the result of the optimization.
Extract current iteration from
optimize_stdout
.Calculate the objective for the optimization.
Perform the optimization.
Methods Documentation
- calculate_covariance_matrix_and_standard_errors(jacobian: ArrayLike, root_mean_square_error: float) ArrayLike [source]
Calculate the covariance matrix and standard errors of the optimization.
- Parameters:
jacobian (ArrayLike) – The jacobian matrix.
root_mean_square_error (float) – The root mean square error.
- Returns:
The covariance matrix.
- Return type:
ArrayLike
- calculate_penalty() ArrayLike [source]
Calculate the penalty of the scheme.
- Returns:
The penalty.
- Return type:
ArrayLike
- create_result() Result [source]
Create the result of the optimization.
- Returns:
The result of the optimization.
- Return type:
- Raises:
InitialParameterError – Raised if the initial parameters could not be evaluated.
- static get_current_optimization_iteration(optimize_stdout: str) int [source]
Extract current iteration from
optimize_stdout
.