https://github.com/ComPWA/K-matrix-research/issues/65 seems to work quite well and can be implemented in TensorWaves. This requires writing some simple test with two UnbinnedNLL estimators.
For instance:
from collections.abc import Iterable, Mapping
from tensorwaves.interface import Estimator, ParameterValue
class EstimatorSum(Estimator):
def __init__(self, estimators: Iterable[Estimator]) -> None:
self.__estimators = tuple(estimators)
def __call__(self, parameters: Mapping[str, ParameterValue]) -> float:
return sum(estimator(parameters) for estimator in self.__estimators)
def gradient(
self, parameters: Mapping[str, ParameterValue]
) -> dict[str, ParameterValue]:
raise NotImplementedError
https://github.com/ComPWA/K-matrix-research/issues/65 seems to work quite well and can be implemented in TensorWaves. This requires writing some simple test with two
UnbinnedNLLestimators.For instance: