Machine learning–based inference toolkit for particle physics
histo_theta_batchsize
sets number of parameter points for which histogram data is loaded in parallel.n_observables
for AsymptoticLimits.observed_limits()
allows overwriting the number of events (= rescaling the log likelihood).DoubleParameterizedRatioEstimator
and LikelihoodEstimator
instances to crashLHEReader
and DelphesReader
LHEReader.add_observable_from_function()
now expects functions with signature observable(truth_particles, leptons, photons, jets, met)
, where truth_particles
are the original particles in the LHE file, and the other arguments have smearing applied to them.dof
keyword in limit functions to overwrite degrees of freedomLHEReader
sample_only_from_closest_benchmark
in the SampleAugmenter
functions and plot_distributions()
then allows the user to restrict the unweighting / resampling at some parameter point to events from the closest benchmark point. This can significantly reduce the weights of individual events and thus reduce the variance.madminer.sampling
.madminer.limits
submodule that calculates expected and observed p-values.madminer.analysis
submodule with a generic DataAnalyzer
class that can be used to access the general setup, weighted events, and cross sections. The classes SampleAugmenter
, FisherInformation
and AsymptoticLimits
subclass it, leading to a more unified interface.n_processes>1
for any sampling call.MLForge
is replaced by four different classes ParameterizedRatioEstimator
, DoubleParameterizedRatioEstimator
, LikelihoodEstimator
, and ScoreEstimator
.EnsembleForge
is now Ensemble
, with renamed functions and less clutter (at the cost of some unimportant functionality)DelphesProcessor
-> DelphesReader
, LHEProcessor
-> LHEReader
madminer.morphing
now lives in madminer.utils.morphing
, and the Morpher
class was renamed PhysicsMorpher
(since we also have a NuisanceMorpher
class)madminer.sampling
has changed in a number of ways. The high-level functions have been renamed: extract_samples_train_plain()
-> sample_train_plain()
, extract_samples_train_local()
-> sample_train_local()
, extract_samples_train_global()
-> train_samples_density()
, extract_samples_train_ratio()
-> sample_train_ratio()
, extract_samples_train_more_ratios()
-> sample_train_more_ratios()
, extract_samples_test()
-> sample_test()
, extract_cross_sections()
-> cross_sections()
. In addition to the physical parameters theta
, they all now take descriptions of the nuisance parameters nu
as input argument, for which new helper functions exist.madminer.sampling
are also different: constant_benchmark_theta()
-> benchmark()
, multiple_benchmark_thetas()
-> benchmarks()
, constant_morphing_theta()
-> morphing_point()
, multiple_morphing_thetas()
-> morphing_points
, random_morphing_thetas()
-> random_morphing_points()
madminer.ml
largely rewrittenmadminer.sampling
largely rewrittenmadminere.utils.analysis
got removed, the old functions are now split between madminer.analysis
and madminer.sampling
trainer
in MLForge.train()
has been renamed to optimizer
MLForge.evaluate()
and MLForge.train()
are goneMLForge
has new methods evaluate_log_likelihood()
, evaluate_log_likelihood_ratio()
, and evaluate_score()
; MLForge.evaluate()
just wraps around them nowplot_uncertainty()
functionplot_distributions()
MLForge.evaluate()
and EnsembleForge.evaluate()
, the keyword x_filename
is replaced by x
, which supports ndarrays
as an alternative to filenamesLHEProcessor
when visible particle pTs are smearedplot_distributions()