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: tensorwaves.interfaces.Model, dataset: Mapping[str, numpy.ndarray], phsp_dataset: Mapping[str, numpy.ndarray], phsp_volume: float = 1.0, backend: Union[str, tuple, dict] = 'numpy')[source]

Bases: tensorwaves.interfaces.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[float, complex]])float[source]

Evaluate discrepancy.

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

Calculate gradient for given parameter mapping.

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