like: add `abstractmethod` decorators
import logging
import numpy as np
+
+from abc import abstractmethod
from scipy.stats import poisson, norm
from ..analysis import DataAnalyzer
@@ -10,12 +12,22 @@ logger = logging.getLogger(__name__)
class BaseLikelihood(DataAnalyzer):
+ @abstractmethod
def create_negative_log_likelihood(self, *args, **kwargs):
raise NotImplementedError()
+ @abstractmethod
def create_expected_negative_log_likelihood(self, *args, **kwargs):
raise NotImplementedError()
+ @abstractmethod
+ def _log_likelihood(self, *args, **kwargs):
+ raise NotImplementedError()
+
+ @abstractmethod
+ def _log_likelihood_kinematic(self, *args, **kwargs):
+ raise NotImplementedError()
+
def _asimov_data(
self,
theta,
@@ -43,12 +55,6 @@ class BaseLikelihood(DataAnalyzer):
return x, weights_theta
- def _log_likelihood(self, *args, **kwargs):
- raise NotImplementedError()
-
- def _log_likelihood_kinematic(self, *args, **kwargs):
- raise NotImplementedError()
-
def _log_likelihood_poisson(
self,
n_observed,
