org.encog.ml.bayesian.training.search.k2
public class SearchK2 extends Object implements BayesSearch
| Constructor and Description |
|---|
SearchK2() |
| Modifier and Type | Method and Description |
|---|---|
double |
calculateG(BayesianNetwork network,
BayesianEvent event,
List<BayesianEvent> parents)
Calculate G.
|
int |
calculateN(BayesianNetwork network,
BayesianEvent event,
List<BayesianEvent> parents,
int[] parentInstance)
Calculate the value N, which is the number of cases, from the training data, where the
desiredValue matches the training data.
|
int |
calculateN(BayesianNetwork network,
BayesianEvent event,
List<BayesianEvent> parents,
int[] parentInstance,
int desiredValue)
Calculate the value N, which is the number of cases, from the training data, where the
desiredValue matches the training data.
|
void |
init(TrainBayesian theTrainer,
BayesianNetwork theNetwork,
MLDataSet theData)
Init the search object.
|
boolean |
iteration()
Perform an iteration.
|
public void init(TrainBayesian theTrainer, BayesianNetwork theNetwork, MLDataSet theData)
init in interface BayesSearchtheTrainer - The trainer to use.theNetwork - The network to usetheData - The data to use.public int calculateN(BayesianNetwork network, BayesianEvent event, List<BayesianEvent> parents, int[] parentInstance, int desiredValue)
network - The network to calculate for.event - The event we are calculating for. (variable i)parents - The parents of the specified event we are considering.parentInstance - The parent instance we are looking for.desiredValue - The desired value.public int calculateN(BayesianNetwork network, BayesianEvent event, List<BayesianEvent> parents, int[] parentInstance)
network - The network to calculate for.event - The event we are calculating for. (variable i)parents - The parents of the specified event we are considering.parentInstance - The parent instance we are looking for.public double calculateG(BayesianNetwork network, BayesianEvent event, List<BayesianEvent> parents)
network - The network to calculate for.event - The event to calculate for.parents - The parents.public boolean iteration()
iteration in interface BayesSearchCopyright © 2014. All Rights Reserved.