TemplateHypothesis¶
-
class
remu.likelihood.
TemplateHypothesis
(templates, constant=None, parameter_limits=None, *args, **kwargs)[source]¶ Bases:
remu.likelihood.LinearHypothesis
Convenience class to turn truth templates into a CompositeHypothesis.
Parameters: - templates : iterable of ndarrays
Iterable of truth vector templates.
- constant : ndarray, optional
Constant offset to be added to the truth vector.
- parameter_limits : iterable of tuple of floats, optional
An iterable of lower and upper limits of the hypothesis’ parameters. Defaults to non-negative parameter values.
- *args, **kwargs : optional
Other arguments are passed to the LinearHypothesis init method.
See also
-
fix_parameters
(fix_values)¶ Return a new CompositeHypothesis by fixing some parameters.
Parameters: - fix_values : iterable of values
This iterable must have the same length as the vector of parameters of the CompositeHypothesis. The parameters of the new CompositeHypothesis are fixed to the given values. Parameters that should not be fixed must be specified with
None
. For example, to fix the first and third parameter of a 3-parameter hypothesis, fix_values must look like this:(1.23, None, 9.87)
The resulting CompositeHypothesis has one free parameter, the second parameter of the original hypothesis.
-
translate
(parameters)¶ Translate the parameter vector to a truth vector.
Parameters: - parameters : ndarray like
Vector of the hypothesis parameters.
Returns: - ndarray
Vector of the corresponding truth space expectation values.