Documentation of 'org.encog.ml.bayesian.training.search.k2.SearchK2' Java class
SearchK2
org.encog.ml.bayesian.training.search.k2

Class SearchK2

  • All Implemented Interfaces:
    BayesSearch


    public class SearchK2
    extends java.lang.Object
    implements BayesSearch
    Search for optimal Bayes structure with K2.
    • Constructor Detail

      • SearchK2

        public SearchK2()
    • Method Detail

      • init

        public void init(TrainBayesian theTrainer,
                         BayesianNetwork theNetwork,
                         MLDataSet theData)
        Init the search object.
        Specified by:
        init in interface BayesSearch
        Parameters:
        theTrainer - The trainer to use.
        theNetwork - The network to use
        theData - The data to use.
      • calculateN

        public int calculateN(BayesianNetwork network,
                              BayesianEvent event,
                              java.util.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. Only cases where the parents match the specifed parent instance are considered.
        Parameters:
        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.
        Returns:
        The value N.
      • calculateN

        public int calculateN(BayesianNetwork network,
                              BayesianEvent event,
                              java.util.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. Only cases where the parents match the specifed parent instance are considered.
        Parameters:
        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.
        Returns:
        The value N.
      • calculateG

        public double calculateG(BayesianNetwork network,
                                 BayesianEvent event,
                                 java.util.List<BayesianEvent> parents)
        Calculate G.
        Parameters:
        network - The network to calculate for.
        event - The event to calculate for.
        parents - The parents.
        Returns:
        The value for G.
      • iteration

        public boolean iteration()
        Perform an iteration.
        Specified by:
        iteration in interface BayesSearch
        Returns:
        True to continue.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.