TemplatePredictor

class remu.likelihood.TemplatePredictor(templates, constants=0, **kwargs)[source]

Bases: remu.likelihood.MatrixPredictor

MatrixPredictor from templates.

Parameters
templatesarray like

The templates to be combined together. Each template gets its own weight parameter. Shape: ([n_systematics,]n_templates,len(template))

constantsndarray, optional

Shape: ([n_systematics,]n_reco_bins)

**kwargsoptional

Additional keyword arguments are passed to the MatrixPredictor.

Methods

__call__(*args, **kwargs)

See prediction().

check_bounds(parameters)

Check that all parameters are within bounds.

compose(other)

Return a new Predictor that is a composition with other.

fix_parameters(fix_values)

Return a new Predictor with fewer free parameters.

prediction(parameters, *args, **kwargs)

Turn a set of parameters into a reco prediction.

check_bounds(parameters)

Check that all parameters are within bounds.

compose(other)

Return a new Predictor that is a composition with other.

new_predictor(parameters) = self(other(parameters))
fix_parameters(fix_values)

Return a new Predictor with fewer free parameters.

Parameters
fix_valuesiterable

List of the parameter values that the parameters should be fixed at. The list must be of the same length as the number of parameters of predictor. Any parameters that should remain unfixed should be specified with None or np.nan.

prediction(parameters, *args, **kwargs)

Turn a set of parameters into a reco prediction.

Returns
predictionndarray
weightsndarray