EstimationProviderUnlinked

class glotaran.optimization.estimation_provider.EstimationProviderUnlinked(dataset_group: DatasetGroup, data_provider: DataProvider, matrix_provider: MatrixProviderUnlinked)[source]

Bases: EstimationProvider

A class to provide estimation for optimization of an unlinked dataset group.

Initialize an estimation provider for an unlinked dataset group.

Parameters:

Attributes Summary

group

Get the dataset group.

Methods Summary

calculate_clp_penalties

Calculate the clp penalty.

calculate_estimation

Calculate the estimation for a dataset.

calculate_full_model_estimation

Calculate the estimation for a dataset with a full model.

calculate_residual

Calculate the clps and the residual for a matrix and data.

estimate

Calculate the estimation.

get_additional_penalties

Get the additional penalty.

get_full_penalty

Get the full penalty.

get_result

Get the results of the estimation.

retrieve_clps

Retrieve clp from reduced clp.

Methods Documentation

calculate_clp_penalties(clp_labels: list[list[str]], clps: list[ndarray], global_axis: ndarray) list[float]

Calculate the clp penalty.

Parameters:
  • clp_labels (list[list[str]]) – The clp labels.

  • clps (list[ArrayLike]) – The clps.

  • global_axis (ArrayLike) – The global axis.

Returns:

The clp penalty.

Return type:

list[float]

calculate_estimation(dataset_model: DatasetModel)[source]

Calculate the estimation for a dataset.

Parameters:

dataset_model (DatasetModel) – The dataset model.

calculate_full_model_estimation(dataset_model: DatasetModel)[source]

Calculate the estimation for a dataset with a full model.

Parameters:

dataset_model (DatasetModel) – The dataset model.

calculate_residual(matrix: ArrayLike, data: ArrayLike) tuple[ArrayLike, ArrayLike]

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]

estimate()[source]

Calculate the estimation.

get_additional_penalties() list[float]

Get the additional penalty.

Returns:

The additional penalty.

Return type:

list[float]

get_full_penalty() ArrayLike[source]

Get the full penalty.

Returns:

The clp penalty.

Return type:

ArrayLike

get_result() tuple[dict[str, list[DataArray]], dict[str, list[DataArray]]][source]

Get the results of the estimation.

Returns:

A tuple of the estimated clps and residuals.

Return type:

tuple[dict[str, xr.DataArray], dict[str, xr.DataArray]]

property group: DatasetGroup

Get the dataset group.

Returns:

The dataset group.

Return type:

DatasetGroup

retrieve_clps(clp_labels: list[str], reduced_clp_labels: list[str], reduced_clps: ArrayLike, index: int) ArrayLike

Retrieve clp from reduced clp.

Parameters:
  • clp_labels (list[str]) – The original clp labels.

  • reduced_clp_labels (list[str]) – The reduced clp labels.

  • reduced_clps (ArrayLike) – The reduced clps.

  • index (int) – The index on the global axis.

Returns:

The retrieved clps.

Return type:

ArrayLike