java.lang.Object
es.upm.fi.cig.multictbnc.util.ProbabilityUtil
Utility class with methods related to the estimation of probabilities.
-
Method Summary
Modifier and TypeMethodDescriptionstatic doubleReturns a probability between 0 or 0.3, or between 0.7 and 1.static <NodeTypeCTBN>
doublelogLikelihoodSequence(Sequence sequence, List<NodeTypeCTBN> nodesCTBN, State stateClassVariables) Computes the log-likelihood of a sequence, also known as temporal likelihood (Stella and Amer 2012), given the state of the class variables.static <NodeTypeBN extends Node>
doublelogPriorProbabilityClassVariables(List<NodeTypeBN> nodesBN, State stateCVs) Computes the logarithm of the prior probability of the class variables taking certain values.static doublemarginalLogLikelihoodSequence(double[] laps) Computes the marginal log-likelihood of a sequence given the unnormalised log-a-posteriori probability for each class configuration.
-
Method Details
-
extremeProbability
public static double extremeProbability()Returns a probability between 0 or 0.3, or between 0.7 and 1.- Returns:
- a probability
-
logLikelihoodSequence
public static <NodeTypeCTBN> double logLikelihoodSequence(Sequence sequence, List<NodeTypeCTBN> nodesCTBN, State stateClassVariables) Computes the log-likelihood of a sequence, also known as temporal likelihood (Stella and Amer 2012), given the state of the class variables. This is done by using the CTBN.- Type Parameters:
NodeTypeCTBN- type of the nodes of the continuous-time Bayesian network- Parameters:
sequence- sequence evaluatednodesCTBN- nodes of a continuous-time Bayesian networkstateClassVariables- class configuration- Returns:
- log-likelihood of the sequence given the class configuration
-
logPriorProbabilityClassVariables
public static <NodeTypeBN extends Node> double logPriorProbabilityClassVariables(List<NodeTypeBN> nodesBN, State stateCVs) Computes the logarithm of the prior probability of the class variables taking certain values. Their probability is computed by using the Bayesian network.- Type Parameters:
NodeTypeBN- type of the nodes of the Bayesian network- Parameters:
nodesBN- nodes of a Bayesian networkstateCVs- class configuration- Returns:
- logarithm of the prior probability of the class variables
-
marginalLogLikelihoodSequence
public static double marginalLogLikelihoodSequence(double[] laps) Computes the marginal log-likelihood of a sequence given the unnormalised log-a-posteriori probability for each class configuration.- Parameters:
laps- unnormalised log-a-posteriori probabilities- Returns:
- marginal log-likelihood of a sequence
-