FixedParameterMatrixPredictor

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

Bases: remu.likelihood.MatrixPredictor, remu.likelihood.FixedParameterPredictor

Wrapper class that fixes parameters of a linear predictor.

Speeds things up considerably compared to the universal FixedParameterPredictor, but only works with 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.

insert_fixed_parameters(parameters)

Insert the fixed parameters into a vector of 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.

insert_fixed_parameters(parameters)

Insert the fixed parameters into a vector of free parameters.

prediction(parameters, *args, **kwargs)

Turn a set of parameters into a reco prediction.

Returns
predictionndarray
weightsndarray