OptimizationGroup

class glotaran.optimization.optimization_group.OptimizationGroup(scheme: Scheme, dataset_group: DatasetGroup)[source]

Bases: object

A class to optimize a dataset group.

Initialize an optimization group for a dataset group.

Parameters:
  • scheme (Scheme) – The optimization scheme.

  • dataset_group (DatasetGroup) – The dataset group.

Attributes Summary

number_of_clps

Return number of conditionally linear parameters.

Methods Summary

add_svd_data

Add the SVD of a data matrix to a dataset.

add_weight_to_result_data

Add weight to result dataset if dataset is weighted.

calculate

Calculate the optimization group data.

create_result_data

Create resulting datasets.

get_additional_penalties

Get additional penalties.

get_full_penalty

Get the full penalty.

Methods Documentation

static add_svd_data(name: str, dataset: Dataset, lsv_dim: str, rsv_dim: str)[source]

Add the SVD of a data matrix to a dataset.

Parameters:
  • name (str) – Name of the data matrix.

  • dataset (xr.Dataset) – Dataset containing the data, which will be updated with the SVD values.

  • lsv_dim (str) – The dimension name of the left singular vectors.

  • rsv_dim (str) – The dimension name of the right singular vectors.

add_weight_to_result_data(dataset_label: str, result_dataset: Dataset)[source]

Add weight to result dataset if dataset is weighted.

Parameters:
  • dataset_label (str) – The label of the data.

  • result_dataset (xr.Dataset) – The label of the data.

calculate(parameters: Parameters)[source]

Calculate the optimization group data.

Parameters:

parameters (Parameters) – The parameters.

create_result_data() dict[str, Dataset][source]

Create resulting datasets.

Returns:

The datasets with the results.

Return type:

dict[str, xr.Dataset]

get_additional_penalties() list[float][source]

Get additional penalties.

Returns:

The additional penalties.

Return type:

list[float]

get_full_penalty() ArrayLike[source]

Get the full penalty.

Returns:

The full penalty.

Return type:

ArrayLike

property number_of_clps: int

Return number of conditionally linear parameters.

Return type:

int