Create Inflated subclasses for specific distributions and positions.
tfp.experimental.distributions.inflated_factory(
default_name, distribution_class, inflated_loc, **more_kwargs
)
Example usages |
SpikeAndSlab = inflated_factory('SpikeAndSlab', tfd.Normal, 0.0)
s_and_s = SpikeAndSlab(inflated_loc_probs=0.3, loc=5.0, scale=2.0)
ZeroInflatedNegativeBinomial = inflated_factory(
'ZeroInflatedNegativeBinomial', tfd.NegativeBinomial, 0.0)
zinb = ZeroInflatedNegativeBinomial(inflated_loc_probs=0.2, probs=0.5,
total_count=10.0)
|
Args |
default_name
|
The name of the subclass, unless the user passes a
name argument to init.
|
distribution_class
|
A tfd.Distribution class.
|
inflated_loc
|
The scalar position to inflate.
|
**more_kwargs
|
Additional keyword arguments to pass to the
distribution_class.
|
Returns |
A Inflated subclass that is the inflated version of distribution_class.
|