Attend the Women in ML Symposium on December 7 Register now

tfp.experimental.distributions.inflated_factory

Create Inflated subclasses for specific distributions and positions.

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)

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.

A Inflated subclass that is the inflated version of distribution_class.