ml4eft.limits.optimize_ns.Optimize
ml4eft.limits.optimize_ns.Optimize#
- class ml4eft.limits.optimize_ns.Optimize(config, coeff=None, rep=None)[source]#
Bases:
object
Optimizer to obtain confidence level intervals in the SMEFT using either binned or unbinned (ML level) observables
- __init__(config, coeff=None, rep=None)[source]#
Optimize constructor
- Parameters
config (dict) – loaded json run card
coeff (array_like, optional) – Subset of
(N,) ndarray
EFT parameter names to include in the fit. Takes all EFT parameters by default.rep (int, optional) – Run the optimiser on a specific replica numner, set to
None
by default, in which case the optimiser works with the median over all replicas.
Methods
__init__
(config[, coeff, rep])Optimize constructor
clean
()Removes raw NS output if no raw output is needed
cube_to_dict
(cube)Converts the prior volume
(N, ) ndarray
to a dict with the EFT parameter names as keyslog_like_binned
(cube)Implementaiton of the binned Poissonian log-likelihood
log_like_nn
(cube)Implementaiton of the unbinned extended log-likelihood using the ML models
log_like_truth
(cube)Implementaiton of the unbinned extended log-likelihood using the analytical differential cross-sections at the parton level
my_prior
(cube)Construct prior volume
Runs the minimisation with Nested Sampling
save
(result)Save NS replicas to json inside a dictionary of the form {'coeff': [replicas values]}
- cube_to_dict(cube)[source]#
Converts the prior volume
(N, ) ndarray
to a dict with the EFT parameter names as keys- Parameters
cube (array_like) – prior volume
- log_like_binned(cube)[source]#
Implementaiton of the binned Poissonian log-likelihood
- Parameters
cube (array_like) – prior volume
- Returns
Binned Poissonian log-likelihood
- Return type
- log_like_nn(cube)[source]#
Implementaiton of the unbinned extended log-likelihood using the ML models
- Parameters
cube (array_like) – prior volume
- Returns
Extended-log likelihood using the ML models
- Return type
- log_like_truth(cube)[source]#
Implementaiton of the unbinned extended log-likelihood using the analytical differential cross-sections at the parton level
- Parameters
cube (array_like) – prior volume
- Returns
Extended-log likelihood using the analytical predictions
- Return type