Fix Bug, add comments to Likelihood.py
@@ -21,6 +21,11 @@ class CombinedLikelihood(DataAnalyzer):
n_observed = len(x_observed)
def nll(params):
+ #Just return the expected Length
+ if params is None:
+ return self.n_nuisance_parameters+self.n_parameters
+
+ #Process input
if (len(params)!= self.n_nuisance_parameters+ self.n_parameters):
logger.warning("Number of parameters is %s, expected %s physical parameters and %s nuisance paramaters",
len(params),self.n_parameters,self.n_nuisance_parameters )
@@ -28,6 +33,7 @@ class CombinedLikelihood(DataAnalyzer):
nu = params[self.n_parameters :]
if len(nu)==0: nu=None
+ #Compute Log Likelihood
log_likelihood = self._log_likelihood(
estimator, n_observed, x_observed, theta, nu, include_xsec, luminosity, x_observed_weights
)
