Class BNParameterLearningAlgorithm

java.lang.Object
es.upm.fi.cig.multictbnc.learning.parameters.bn.BNParameterLearningAlgorithm
All Implemented Interfaces:
ParameterLearningAlgorithm
Direct Known Subclasses:
BNBayesianEstimation, BNMaximumLikelihoodEstimation

public abstract class BNParameterLearningAlgorithm extends Object implements ParameterLearningAlgorithm
Defines methods for parameter learning algorithms of discrete Bayesian networks.
  • Constructor Details

    • BNParameterLearningAlgorithm

      public BNParameterLearningAlgorithm()
  • Method Details

    • setSufficientStatistics

      public void setSufficientStatistics(List<? extends Node> nodes, Dataset dataset)
      Obtains for each node the number of times it takes a certain state while its parents take a certain instantiation.
      Parameters:
      nodes - list of nodes
      dataset - dataset from which the sufficient statistics are extracted
    • learn

      public void learn(Node node, Dataset dataset)
      Description copied from interface: ParameterLearningAlgorithm
      Learns the parameters of a certain node of a PGM.
      Specified by:
      learn in interface ParameterLearningAlgorithm
      Parameters:
      node - node of the PGM
      dataset - dataset used to learn the parameters
    • learn

      public void learn(List<? extends Node> nodes, Dataset dataset)
      Description copied from interface: ParameterLearningAlgorithm
      Learns the parameters of a certain PGM.
      Specified by:
      learn in interface ParameterLearningAlgorithm
      Parameters:
      nodes - nodes of the PGM
      dataset - dataset used to learn the parameters
    • setSufficientStatistics

      public void setSufficientStatistics(Node node, Dataset dataset)
      Description copied from interface: ParameterLearningAlgorithm
      Obtains the sufficient statistics of a BN node.
      Specified by:
      setSufficientStatistics in interface ParameterLearningAlgorithm
      Parameters:
      node - node whose sufficient statistics will be computed
      dataset - dataset used to compute the sufficient statistics
    • getSufficientStatisticsNode

      protected abstract BNSufficientStatistics getSufficientStatisticsNode(DiscreteStateNode node, Dataset dataset)
      Returns the sufficient statistics of a DiscreteNode for a given Dataset.
      Parameters:
      node - a DiscreteNode
      dataset - dataset from which the sufficient statistics are extracted
      Returns:
      sufficient statistics of the provided node