Problem

class glotaran.analysis.problem.Problem(scheme: glotaran.analysis.scheme.Scheme)[source]

Bases: object

A Problem class

Initializes the Problem class from a scheme (glotaran.analysis.scheme.Scheme)

Args:
scheme (Scheme): An instance of glotaran.analysis.scheme.Scheme

which defines your model, parameters, and data

Attributes Summary

additional_penalty

bag

clp_labels

clps

data

filled_dataset_descriptors

full_penalty

grouped

groups

index_dependent

matrices

model

Property providing access to the used model

parameter_history

parameters

reduced_clp_labels

reduced_clps

reduced_matrices

residuals

scheme

Property providing access to the used scheme

weighted_residuals

Methods Summary

calculate_additional_penalty

Calculates additional penalties by calling the model.additional_penalty function.

calculate_index_dependent_grouped_matrices

calculate_index_dependent_grouped_residual

calculate_index_dependent_ungrouped_matrices

calculate_index_dependent_ungrouped_residual

calculate_index_independent_grouped_matrices

calculate_index_independent_grouped_residual

calculate_index_independent_ungrouped_matrices

calculate_index_independent_ungrouped_residual

calculate_matrices

calculate_residual

create_result_data

reset

Resets all results and DatasetDescriptors.

save_parameters_for_history

Methods Documentation

property additional_penalty
property bag
calculate_additional_penalty()Union[numpy.ndarray, Dict[str, numpy.ndarray]][source]

Calculates additional penalties by calling the model.additional_penalty function.

calculate_index_dependent_grouped_matrices()Tuple[Dict[str, List[List[str]]], Dict[str, List[numpy.ndarray]], List[List[str]], List[numpy.ndarray]][source]
calculate_index_dependent_grouped_residual()Tuple[List[numpy.ndarray], List[numpy.ndarray], List[numpy.ndarray], List[numpy.ndarray]][source]
calculate_index_dependent_ungrouped_matrices()Tuple[Dict[str, List[List[str]]], Dict[str, List[numpy.ndarray]], Dict[str, List[str]], Dict[str, List[numpy.ndarray]]][source]
calculate_index_dependent_ungrouped_residual()Tuple[Dict[str, List[numpy.ndarray]], Dict[str, List[numpy.ndarray]], Dict[str, List[numpy.ndarray]], Dict[str, List[numpy.ndarray]]][source]
calculate_index_independent_grouped_matrices()Tuple[Dict[str, List[str]], Dict[str, numpy.ndarray], Dict[str, glotaran.analysis.problem.LabelAndMatrix]][source]
calculate_index_independent_grouped_residual()Tuple[List[numpy.ndarray], List[numpy.ndarray], List[numpy.ndarray], List[numpy.ndarray]][source]
calculate_index_independent_ungrouped_matrices()Tuple[Dict[str, List[str]], Dict[str, numpy.ndarray], Dict[str, List[str]], Dict[str, numpy.ndarray]][source]
calculate_index_independent_ungrouped_residual()Tuple[Dict[str, List[numpy.ndarray]], Dict[str, List[numpy.ndarray]], Dict[str, List[numpy.ndarray]], Dict[str, List[numpy.ndarray]]][source]
calculate_matrices()[source]
calculate_residual()[source]
property clp_labels
property clps
create_result_data(copy: bool = True, history_index: Optional[int] = None)Dict[str, xarray.core.dataset.Dataset][source]
property data
property filled_dataset_descriptors
property full_penalty
property grouped
property groups
property index_dependent
property matrices
property model

Property providing access to the used model

The model is a subclass of glotaran.model.Model decorated with the @model decorator glotaran.model.model_decorator.model For an example implementation see e.g. glotaran.builtin.models.kinetic_spectrum

Returns:
Model: A subclass of glotaran.model.Model

The model must be decorated with the @model decorator glotaran.model.model_decorator.model

property parameter_history
property parameters
property reduced_clp_labels
property reduced_clps
property reduced_matrices
reset()[source]

Resets all results and DatasetDescriptors. Use after updating parameters.

property residuals
save_parameters_for_history()[source]
property scheme

Property providing access to the used scheme

Returns:
Scheme: An instance of glotaran.analysis.scheme.Scheme

Provides access to data, model, parameters and optimization arguments.

property weighted_residuals