LinearHypothesis¶
-
class
remu.likelihood.
LinearHypothesis
(M, b=None, *args, **kwargs)¶ Bases:
remu.likelihood.CompositeHypothesis
Special case of CompositeHypothesis for linear combinations.
Parameters: - M : 2-dimensional ndarray
The matrix translating the parameter vector into a truth vector:
truth = M.dot(parameters)
- b : ndarray, optional
A constant (vector) to be added to the truth vector:
truth = M.dot(parameters) + b
- *args, **kwargs : optional
Other arguments are passed on to the CompositeHypothesis init method.
See also
-
fix_parameters
(fix_values)¶ Return a new LinearHypothesis by fixing some parameters.
Parameters: - fix_values : iterable of values
This iterable must have the same length as the vector of parameters of the LinearHypothesis. The parameters of the new LinearHypothesis 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 LinearHypothesis 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.