26 #ifndef GUM_ESTIMATOR_H 27 #define GUM_ESTIMATOR_H 36 template <
typename GUM_SCALAR >
76 GUM_SCALAR virtualLBPSize);
138 GUM_SCALAR
EV(std::string name,
Idx val);
158 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS aGrUM's Potential is a multi-dimensional array with tensor operators.
void setFromBN(const IBayesNet< GUM_SCALAR > *bn, const NodeSet &hardEvidence)
estimator initializing
void clear()
refresh the estimator state as empty
This file contains gibbs sampling (for BNs) class definitions.
const Potential< GUM_SCALAR > & posterior(const DiscreteVariable &var)
returns the posterior of a node
HashTable< std::string, std::vector< GUM_SCALAR > > _estimator
estimator represented by hashtable between each variable name and a vector of cumulative sample weigh...
GUM_SCALAR _wtotal
cumulated weights of all samples
Size _ntotal
number of generated samples
Class representing Bayesian networks.
void update(Instantiation I, GUM_SCALAR w)
updates the estimator with a given sample
Base class for discrete random variable.
Class representing the minimal interface for Bayesian Network.
gum is the global namespace for all aGrUM entities
The class for generic Hash Tables.
GUM_SCALAR EV(std::string name, Idx val)
returns expected value of Bernouilli variable (called by it's name) of given parameter ...
void setFromLBP(LoopyBeliefPropagation< GUM_SCALAR > *lbp, const NodeSet &hardEvidence, GUM_SCALAR virtualLBPSize)
sets the estimatoor object with posteriors obtained by LoopyBeliefPropagation
Implementation of Estimator for approximate inference in bayesian networks.
const IBayesNet< GUM_SCALAR > * _bn
bayesian network on which approximation is done
<agrum/BN/inference/loopyBeliefPropagation.h>
Class for assigning/browsing values to tuples of discrete variables.
GUM_SCALAR variance(std::string name, Idx val)
returns variance of Bernouilli variable (called by it's name) of given parameter
Size Idx
Type for indexes.
Estimator()
Default constructor.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Class hash tables iterators.
HashTable< std::string, Potential< GUM_SCALAR > *> __target_posteriors
the set of single posteriors computed during the last inference
GUM_SCALAR confidence()
computes the maximum length of confidence interval for each possible value of each variable ...