Navigation

There are currently three real types of CPD nodes in this directory, but there could be infinitely many more. The crazy type listed last is meant to show that classes can exist for any computational way to sample a node based on its parent values. The flexibility provided allows for random sampling to exist in hybrid networks.

This module contains tools for representing discrete nodes – those with a finite number of outcomes and a finite number of possible parent values – as class instances with their own choose method to choose an outcome for themselves based on parent outcomes.

Where the keys are each possible combination of parent values and the values are the probability of each of the n possible node outcomes, given those parent outcomes. The Vdataentry attribute is set equal to this Vdataentry input upon instantiation.

This module contains tools for representing linear Gaussian nodes – those with a continuous linear Gaussian distribution of outcomes and a finite number of linear Gaussian parents – as class instances with their own choose method to choose an outcome for themselves based on parent outcomes.

This module contains tools for representing “LG + D” (linear Gaussian and discrete) nodes – those with a Gaussian distribution, one or more Gaussian parents, and one or more discrete parents – as class instances with their own choose method to choose an outcome for themselves based on parent outcomes.

This "cprob" entry contains a linear Gaussian distribution (conditioned on the Gaussian parents) for each combination of discrete parents. The Vdataentry attribute is set equal to this Vdataentry input upon instantiation.

Randomly choose state of node from probability distribution conditioned on pvalues.

This method has two parts: (1) determining the proper probability
distribution, and (2) using that probability distribution to determine
an outcome.

Arguments:

pvalues – An array containing the assigned states of the node’s parents. This must be in the same order as the parents appear in self.Vdataentry['parents'].

The function goes to the entry of "cprob" that matches the outcomes of its discrete parents. Then, it constructs a Gaussian distribution based on its Gaussian parents and the parameters found at that entry. Last, it samples from that distribution and returns its outcome.

This module contains tools for representing “crazy” nodes – nodes where the method for sampling is to multiply the crazyinput by -10 or 10 and add \(\pi\) – as class instances with their own choose method to choose an outcome for themselves based on parent outcomes.

The existence of this ‘crazy’ type is meant to indicate the true universality of
the universal sampling method found in hybayesiannetwork. While no CPD would
actually be this crazy, the libary has the setup to support any type of CPD.