29 #ifndef GUM_ESTIMATOR_H 30 #define GUM_ESTIMATOR_H 39 template <
typename GUM_SCALAR >
79 GUM_SCALAR virtualLBPSize);
141 GUM_SCALAR
EV(std::string name,
Idx val);
161 #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
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
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
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
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.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
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
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
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.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
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 ...