Module es.upm.fi.cig.multictbnc
Class BNBayesianEstimation
java.lang.Object
es.upm.fi.cig.multictbnc.learning.parameters.bn.BNParameterLearningAlgorithm
es.upm.fi.cig.multictbnc.learning.parameters.bn.BNBayesianEstimation
- All Implemented Interfaces:
ParameterLearningAlgorithm
Implements the Bayesian estimation to estimate the parameters of a BN. It is assumed a Dirichlet prior distribution
over the probabilities of each state of the variables, given the state of their parents. The imaginary counts should
be defined based on the number of states of the node and its parents, so the total number of imaginary samples is not
influenced by the cardinality of those nodes.
-
Constructor Summary
ConstructorDescriptionBNBayesianEstimation
(double nxHP) Receives the hyperparameter of the Dirichlet prior distribution over the parameters (i.e. imaginary counts). -
Method Summary
Modifier and TypeMethodDescriptionReturns a unique identifier for the parameter learning algorithm.Gets the name of the method to learn the parameters.Returns the parameters that are used by the algorithm.protected BNSufficientStatistics
getSufficientStatisticsNode
(DiscreteStateNode node, Dataset dataset) Returns the sufficient statistics of aDiscreteNode
for a givenDataset
.Methods inherited from class es.upm.fi.cig.multictbnc.learning.parameters.bn.BNParameterLearningAlgorithm
learn, learn, setSufficientStatistics, setSufficientStatistics
-
Constructor Details
-
BNBayesianEstimation
public BNBayesianEstimation(double nxHP) Receives the hyperparameter of the Dirichlet prior distribution over the parameters (i.e. imaginary counts).- Parameters:
nxHP
- number of times the variables are in a certain state while its parents take a certain instantiation (hyperparameter)
-
-
Method Details
-
getIdentifier
Description copied from interface:ParameterLearningAlgorithm
Returns a unique identifier for the parameter learning algorithm.- Returns:
- unique identifier for the parameter learning algorithm
-
getNameMethod
Description copied from interface:ParameterLearningAlgorithm
Gets the name of the method to learn the parameters.- Returns:
- name of the method to learn the parameters
-
getParametersAlgorithm
Description copied from interface:ParameterLearningAlgorithm
Returns the parameters that are used by the algorithm.- Returns:
- a
Map
with the parameters used by the algorithm
-
getSufficientStatisticsNode
protected BNSufficientStatistics getSufficientStatisticsNode(DiscreteStateNode node, Dataset dataset) Description copied from class:BNParameterLearningAlgorithm
Returns the sufficient statistics of aDiscreteNode
for a givenDataset
.- Specified by:
getSufficientStatisticsNode
in classBNParameterLearningAlgorithm
- Parameters:
node
- aDiscreteNode
dataset
- dataset from which the sufficient statistics are extracted- Returns:
- sufficient statistics of the provided node
-