twodlearn.bayesnet.linear module

class twodlearn.bayesnet.linear.VLinear(**kargs)[source]

Bases: twodlearn.core.common.TdlModel

variational linear model

Tdl autoinitialization with arguments:

weights[source]

(Submodel) linear weights

basis_dim[source]

(InputArgument) number of dimensions of the explicit basis

weights_prior[source]

(Submodel) prior for the linear parameters

basis[source]

(InputModel)

batch_shape[source]

(InputArgument) number of output dimensions

class VLinearELBO(**kargs)[source]

Bases: twodlearn.core.common.TdlModel

property basis_x[source]
batch_size[source]
dataset_size[source]

number of samples in the entire dataset

expected_log_likelihood[source]
property inputs[source]
labels[source]
melbo[source]
posterior[source]
value[source]
property weights[source]
weights_kl[source]
property weights_prior[source]
property y_scale[source]
class VLinearTransform(**kargs)[source]

Bases: twodlearn.bayesnet.distributions.MVN

distribution after performing a linear transformation

basis_x[source]
covariance[source]
inputs[source]
loc[source]
model[source]

VLinear model

neg_melbo(labels, dataset_size=None)[source]

return the negative mean elbo

property weights[source]
property weights_prior[source]
with_noise()[source]

return the posterior with noise

y_scale[source]

linear operation for y_scale

basis[source]
basis_dim[source]

number of dimensions of the explicit basis

batch_shape[source]

number of output dimensions

weights[source]

linear weights

weights_prior[source]

prior for the linear parameters