FixedParameterPredictor

class remu.likelihood.FixedParameterPredictor(predictor, fix_values)[source]

Bases: remu.likelihood.Predictor

Wrapper class that fixes parameters of another predictor.

The resulting Predictor will have fewer parameters, namely those that have not been fixed.

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.

insert_fixed_parameters(parameters)

Insert the fixed parameters into a vector of free parameters.

prediction(parameters[, systematics_index])

Turn a set of parameters into an ndarray of predictions.

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.

insert_fixed_parameters(parameters)[source]

Insert the fixed parameters into a vector of free parameters.

prediction(parameters, systematics_index=slice(None, None, None))[source]

Turn a set of parameters into an ndarray of predictions.

Parameters
parametersndarray
systematics_indexint, optional
Returns
prediction, weightsndarray