estimator

import tensorwaves.estimator

Defines estimators which estimate a model’s ability to represent the data.

All estimators have to implement the Estimator interface.

class UnbinnedNLL(model: Union[Function, Model], dataset: Mapping[Union[int, str], ndarray], phsp_dataset: Mapping[Union[int, str], ndarray], phsp_volume: float = 1.0, backend: Union[str, tuple, dict] = 'numpy', use_caching: bool = False, fixed_parameters: Optional[Dict[str, Union[complex, float]]] = None)[source]

Bases: tensorwaves.interface.Estimator

Unbinned negative log likelihood estimator.

Parameters
  • model – A model that should be compared to the dataset.

  • dataset – The dataset used for the comparison. The model has to be evaluateable with this dataset.

  • phsp_set – A phase space dataset, which is used for the normalization. The model has to be evaluateable with this dataset. When correcting for the detector efficiency use a phase space sample, that passed the detector reconstruction.

__call__(parameters: Mapping[str, Union[complex, float]]) float[source]

Evaluate discrepancy.

gradient(parameters: Mapping[str, Union[complex, float]]) Dict[str, Union[complex, float]][source]

Calculate gradient for given parameter mapping.

gradient_creator(function: Callable[[Mapping[str, Union[complex, float]]], Union[complex, float]], backend: Union[str, tuple, dict]) Callable[[Mapping[str, Union[complex, float]]], Dict[str, Union[complex, float]]][source]