twodlearn.bayesnet.distributions module¶
-
class
twodlearn.bayesnet.distributions.
MVN
(**kargs)[source]¶ Bases:
twodlearn.core.common.TdlModel
multivariate normal distribution
-
shape
[source]¶ shape of the distribution The shape assumes the last dimention corresponds to a set of mvn vectors. Shape is divided as [batch_shape, event_shape]. Event shape is the shape of the samples for a single distribution. Batch_shape corresponds to the number of independent MVN distributions.
-
-
class
twodlearn.bayesnet.distributions.
MVNDiag
(**kargs)[source]¶ Bases:
twodlearn.bayesnet.distributions.MVN
multivariate normal distribution
-
class
twodlearn.bayesnet.distributions.
MVNScaledIdentity
(**kargs)[source]¶ Bases:
twodlearn.bayesnet.distributions.MVNDiag
Multivariate Normal Distribution with Scaled Identity covariance.
Scale correspond to the covariance scale, shape is required.
Parameters are instantiated as Trainable by default
tdl.bayesnet.distributions.MVNScaledIdentity( shape=[10], scale=0.5)
To instantiate parameters as tensors (not trainable) use AutoInit classes:
tdl.bayesnet.distributions.MVNScaledIdentity( shape=[10], scale=(0.5, tdl.AutoTensor()), # initialize scale using 0.5 tensor loc=tdl.AutoTensor()) # initialize scale using the default value (0)
-
class
twodlearn.bayesnet.distributions.
Normal
(loc, scale, name='McNormal', **kargs)[source]¶ Bases:
twodlearn.core.common.TdlModel
normal distribution x= loc + scale*e, where e sim N(0, I)