-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
When using "real-exponential" weight in the BlockState class there is an inconsistency between the source code and documentation.
The documentation states that for the "real-exponential" or "discrete-poisson" weights the parameter lists is "r", "theta". Here is the exact sentence in the documentation:
The parameter list is ``["r", "theta"]``, corresponding to the parameters of the Gamma distribution.
However, if one calls BlockState feeding "rec_params=[{"r":1, "theta": 2}" a bug occurs. Namely,
unknown parameters for weight type: ['r', 'theta']
The reason behind this bug can be found in the source code. The relevant source code reads:
...
elif rt in [libinference.rec_type.real_exponential,
libinference.rec_type.discrete_poisson]:
if rec_params[i] != "microcanonical":
defaults = {"alpha": 1,
"beta": self.rec[i].fa.mean()}
else:
defaults = {"alpha": numpy.nan,
"beta": numpy.nan}
...
Hence, the parameters "r" and "theta" are actually called "alpha" and "beta" in the source code.
Metadata
Metadata
Assignees
Labels
No labels