openest.models.model module¶
-
class
openest.models.model.Attribute(title, description, reference, subtitle, value, comments, source)[source]¶ Bases:
objectAn attribute is an arbitrary piece of information about a model, available from the attribute functions on Model.
-
class
openest.models.model.Model(scaled=True)[source]¶ Bases:
objectModel class
Top level Model class, from which all specific model derive. All models should implement most of these functions (with the notable exceptions of merge and combine).
-
static
combine(models, factors)[source]¶ Construct a weighted sum over the shared values of x
Each form provides methods for constructing the distribution of the sum of multiple parameters, which is generally constructed by performing the convolution: $p(y + z | x) = p_y(y | x) * p_z(z | x)$.
-
combiners= {'bin_model+bin_model': <function combine at 0x7f6e18e4a140>, 'bin_model+ddp_model': <function <lambda> at 0x7f6e18e4a230>, 'bin_model+spline_model': <function <lambda> at 0x7f6e18e4a2a8>, 'ddp_model+ddp_model': <function combine at 0x7f6e1c30b5f0>, 'delta_model+ddp_model': <function combine at 0x7f6e145cda28>, 'delta_model+delta_model': <function combine at 0x7f6e145cda28>, 'delta_model+spline_model': <function combine at 0x7f6e145cda28>, 'mean_size_model+mean_size_model': <function combine at 0x7f6e147a2b18>, 'spline_model+ddp_model': <function <lambda> at 0x7f6e18e34398>, 'spline_model+spline_model': <function combine at 0x7f6e18e30398>}¶
-
eval_pval(x, p, threshold=0.001)[source]¶ Inverse CDF Evaluation
Returns the value of $y$ that corresponds to a given p-value: $F^{-1}(p | x)$.
-
static
merge(models)[source]¶ Pooling Merging
Each form provides methods for producing a pooled parameter estimate from multiple parameter estimates. These could all be parameter estimates with the same form, or with two different forms: $p_1(y | x) p_2(y | x)$.
-
mergers= {'bin_model': <function merge at 0x7f6e18e4a0c8>, 'bin_model+ddp_model': <function <lambda> at 0x7f6e18e34410>, 'bin_model+spline_model': <function <lambda> at 0x7f6e18e4a1b8>, 'ddp_model': <function merge at 0x7f6e1c30b578>, 'delta_model': <function merge at 0x7f6e145cdb18>, 'delta_model+ddp_model': <function merge at 0x7f6e145cdb18>, 'delta_model+spline_model': <function merge at 0x7f6e145cdb18>, 'mean_size_model': <function merge at 0x7f6e147a2c08>, 'spline_model': <function merge at 0x7f6e18e30320>, 'spline_model+ddp_model': <function <lambda> at 0x7f6e193b0140>}¶
-
scale_p(a)[source]¶ Raise the distribution to the power ‘a’ and rescales.
Returns: modifies this model and returns it Return type: self
-
static