EstimationProvider
- class glotaran.optimization.estimation_provider.EstimationProvider(dataset_group: DatasetGroup)[source]
Bases:
object
A class to provide estimation for optimization.
Initialize an estimation provider for a dataset group.
- Parameters:
dataset_group (DatasetGroup) – The dataset group.
- Raises:
UnsupportedResidualFunctionError – Raised when residual function of the group dataset group is unsupported.
Attributes Summary
Get the dataset group.
Methods Summary
Calculate the clp penalty.
Calculate the clps and the residual for a matrix and data.
Calculate the estimation.
Get the additional penalty.
Get the full penalty.
Get the results of the estimation.
Retrieve clp from reduced clp.
Methods Documentation
- calculate_clp_penalties(clp_labels: list[list[str]], clps: list[ndarray], global_axis: ndarray) list[float] [source]
Calculate the clp penalty.
- calculate_residual(matrix: ArrayLike, data: ArrayLike) tuple[ArrayLike, ArrayLike] [source]
Calculate the clps and the residual for a matrix and data.
- Parameters:
matrix (ArrayLike) – The matrix.
data (ArrayLike) – The data.
- Returns:
The estimated clp and residual.
- Return type:
tuple[ArrayLike, ArrayLike]
- get_full_penalty() ArrayLike [source]
Get the full penalty.
- Returns:
ArrayLike – The clp penalty.
.. # noqa (DAR202)
.. # noqa (DAR401)
- get_result() tuple[dict[str, DataArray], dict[str, DataArray]] [source]
Get the results of the estimation.
- Returns:
tuple[dict[str, xr.DataArray], dict[str, xr.DataArray]] – A tuple of the estimated clps and residuals.
.. # noqa (DAR202)
.. # noqa (DAR401)
- property group: DatasetGroup
Get the dataset group.
- Returns:
The dataset group.
- Return type: