Module es.upm.fi.cig.multictbnc
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract BNSufficientStatistics
getSufficientStatisticsNode
(DiscreteStateNode node, Dataset dataset) Returns the sufficient statistics of aDiscreteNode
for a givenDataset
.void
Learns the parameters of a certain node of a PGM.void
Learns the parameters of a certain PGM.void
setSufficientStatistics
(Node node, Dataset dataset) Obtains the sufficient statistics of a BN node.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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface es.upm.fi.cig.multictbnc.learning.parameters.ParameterLearningAlgorithm
getIdentifier, getNameMethod, getParametersAlgorithm
-
Constructor Details
-
BNParameterLearningAlgorithm
public BNParameterLearningAlgorithm()
-
-
Method Details
-
setSufficientStatistics
Obtains for each node the number of times it takes a certain state while its parents take a certain instantiation.- Parameters:
nodes
- list of nodesdataset
- dataset from which the sufficient statistics are extracted
-
learn
Description copied from interface:ParameterLearningAlgorithm
Learns the parameters of a certain node of a PGM.- Specified by:
learn
in interfaceParameterLearningAlgorithm
- Parameters:
node
- node of the PGMdataset
- dataset used to learn the parameters
-
learn
Description copied from interface:ParameterLearningAlgorithm
Learns the parameters of a certain PGM.- Specified by:
learn
in interfaceParameterLearningAlgorithm
- Parameters:
nodes
- nodes of the PGMdataset
- dataset used to learn the parameters
-
setSufficientStatistics
Description copied from interface:ParameterLearningAlgorithm
Obtains the sufficient statistics of a BN node.- Specified by:
setSufficientStatistics
in interfaceParameterLearningAlgorithm
- Parameters:
node
- node whose sufficient statistics will be computeddataset
- dataset used to compute the sufficient statistics
-
getSufficientStatisticsNode
protected abstract BNSufficientStatistics getSufficientStatisticsNode(DiscreteStateNode node, Dataset dataset) Returns the sufficient statistics of aDiscreteNode
for a givenDataset
.- Parameters:
node
- aDiscreteNode
dataset
- dataset from which the sufficient statistics are extracted- Returns:
- sufficient statistics of the provided node
-