|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectunbbayes.prs.hybridbn.GaussianMixture
public class GaussianMixture
Gaussian Mixture inference algorithm. It calculates the prior (compilation) for the discrete nodes and the mean and variance for the continuous nodes. The propagation is not yet implemented.
| Field Summary | |
|---|---|
protected ProbabilisticNetwork |
clonedPN
|
protected List<Node> |
nodeOrderQueue
|
protected ProbabilisticNetwork |
pn
|
| Constructor Summary | |
|---|---|
GaussianMixture()
Default constructor - created for plugin support |
|
GaussianMixture(ProbabilisticNetwork pn)
|
|
| Method Summary | |
|---|---|
protected void |
addAdjacentNodes(Node node,
List<Node> nodeInNetwork)
|
protected void |
addToOrderQueue(ArrayList<Node> children,
boolean[] nodeAddedList)
Take the children of a node that have already been added to the queue. |
protected ProbabilisticNetwork |
clonePN(ProbabilisticNetwork network)
As I am not sure if the clone methods are corrected. |
protected void |
createOrderQueue()
Creates the queue of the nodes that are going to be analyzed. |
String |
getDescription()
Obtains the description of this algorithm. |
protected Integer |
getIndexInQueue(Node node)
Retrieves the node's index in the queue. |
String |
getName()
Obtains the name of this algorithm |
Graph |
getNetwork()
|
List<Node> |
getNodeOrderQueue()
Return the order the nodes are in the sampled matrix. |
protected List<Integer> |
getParentsIndexesInQueue(ProbabilisticNode node)
Return the indexes (sampling order) in the queue for the parents of a given node. |
protected void |
init()
|
protected void |
initOrderQueue(boolean[] nodeAddedList)
Initializes the queue with the nodes that are root. |
void |
propagate()
Propagate evidences. |
void |
reset()
Resets the algorithm and optionally the network state. |
void |
run()
Runs the algorithm given the current state of the attributes. |
void |
setNetwork(Graph g)
Sets the network (graph) treated by this algorithm. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ProbabilisticNetwork pn
protected ProbabilisticNetwork clonedPN
protected List<Node> nodeOrderQueue
| Constructor Detail |
|---|
public GaussianMixture()
public GaussianMixture(ProbabilisticNetwork pn)
| Method Detail |
|---|
public List<Node> getNodeOrderQueue()
protected void init()
protected void createOrderQueue()
protected void initOrderQueue(boolean[] nodeAddedList)
nodeAddedList - Keeps track of the nodes that have already been added to the queue (nodeAddedList[nodeIndex]=true).
protected void addToOrderQueue(ArrayList<Node> children,
boolean[] nodeAddedList)
children - Children of a node that is already in the queue.nodeAddedList - Nodes that have already been added to the queue.
public void run()
throws IllegalStateException
IInferenceAlgorithm
run in interface IInferenceAlgorithmIllegalStateException - : this exception
may also be used for general purpose.
protected void addAdjacentNodes(Node node,
List<Node> nodeInNetwork)
protected List<Integer> getParentsIndexesInQueue(ProbabilisticNode node)
node - The node to retrieve the parents for finding the indexes.
protected Integer getIndexInQueue(Node node)
node -
protected ProbabilisticNetwork clonePN(ProbabilisticNetwork network)
network -
public void setNetwork(Graph g)
throws IllegalArgumentException
IInferenceAlgorithm
setNetwork in interface IInferenceAlgorithmg - : the network (graph) to set.
IllegalArgumentException - : if the given graph is not appropriate
for this algorithm.public Graph getNetwork()
getNetwork in interface IInferenceAlgorithmpublic String getDescription()
IInferenceAlgorithm
getDescription in interface IInferenceAlgorithmpublic String getName()
IInferenceAlgorithm
getName in interface IInferenceAlgorithmpublic void reset()
IInferenceAlgorithm
reset in interface IInferenceAlgorithmpublic void propagate()
IInferenceAlgorithm
propagate in interface IInferenceAlgorithm
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||