GaussianNetwork

class pyapprox.bayes.GaussianNetwork(graph)[source]

Bases: object

A Bayesian network of linear Gaussian models.

Methods Summary

add_data_to_network(data_cpd_mats, ...)

Todo pass in argument containing nodes which have data for situations when not all nodes have data

assemble_evidence(data)

Assemble the evidence in the form needed to condition the network

construct_dataless_network()

convert_to_compact_factors()

Compute the factors of the network

num_vars()

Return number of uncertain variables in the network

Methods Documentation

add_data_to_network(data_cpd_mats, data_cpd_vecs, noise_covariances)[source]

Todo pass in argument containing nodes which have data for situations when not all nodes have data

assemble_evidence(data)[source]

Assemble the evidence in the form needed to condition the network

Returns:
evidencenp.ndarray (nevidence)

The data used to condition the network

evidence_var_idsnp.ndarray (nevidence)

The variable ids containing each data

Notes

Relies on order vandermondes are added in network.add_data_to_network

construct_dataless_network()[source]
convert_to_compact_factors()[source]

Compute the factors of the network

num_vars()[source]

Return number of uncertain variables in the network

Returns:
nnetwork_varsinteger

The number of uncertain variables in the network