![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
class containing all variables and methods required for Gibbssampling More...
#include <agrum/BN/inference/gibbsOperator.h>
Public Member Functions | |
GibbsOperator (const IBayesNet< GUM_SCALAR > &BN, const NodeProperty< Idx > *hardEv, Size nbr=1, bool atRandom=false) | |
constructor More... | |
virtual | ~GibbsOperator () |
Destructor. More... | |
Size | nbrDrawnVar () const |
Getters and setters. More... | |
void | setNbrDrawnVar (Size nbr) |
bool | isDrawnAtRandom () const |
void | setDrawnAtRandom (bool atRandom) |
Instantiation | monteCarloSample () |
draws a Monte Carlo sample More... | |
Instantiation | nextSample (Instantiation prev) |
draws next sample of Gibbs sampling More... | |
Protected Attributes | |
Size | counting_ |
const IBayesNet< GUM_SCALAR > & | samplingBn_ |
const NodeProperty< Idx > * | hardEv_ |
Sequence< NodeId > | samplingNodes_ |
Size | nbr_ |
bool | atRandom_ |
class containing all variables and methods required for Gibbssampling
Definition at line 49 of file gibbsOperator.h.
gum::GibbsOperator< GUM_SCALAR >::GibbsOperator | ( | const IBayesNet< GUM_SCALAR > & | BN, |
const NodeProperty< Idx > * | hardEv, | ||
Size | nbr = 1 , |
||
bool | atRandom = false |
||
) |
constructor
Definition at line 36 of file gibbsOperator_tpl.h.
|
virtual |
Destructor.
Definition at line 47 of file gibbsOperator_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
private |
Definition at line 82 of file gibbsOperator_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
private |
change in Instantiation I a new drawn value for id
Definition at line 102 of file gibbsOperator_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
private |
Definition at line 52 of file gibbsOperator_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
inline |
Definition at line 69 of file gibbsOperator.h.
References gum::GibbsOperator< GUM_SCALAR >::atRandom_.
Instantiation gum::GibbsOperator< GUM_SCALAR >::monteCarloSample | ( | ) |
draws a Monte Carlo sample
returns a MC sample This is not a really sample since we take into account evidence without care about parent of evidence, etc. This is just a not-so-bad first sample for GibbsSampler
Definition at line 67 of file gibbsOperator_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
inline |
Instantiation gum::GibbsOperator< GUM_SCALAR >::nextSample | ( | Instantiation | prev | ) |
draws next sample of Gibbs sampling
Definition at line 90 of file gibbsOperator_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
inline |
Definition at line 71 of file gibbsOperator.h.
References gum::GibbsOperator< GUM_SCALAR >::atRandom_.
|
inline |
Definition at line 67 of file gibbsOperator.h.
|
protected |
Definition at line 86 of file gibbsOperator.h.
Referenced by gum::GibbsOperator< GUM_SCALAR >::isDrawnAtRandom(), and gum::GibbsOperator< GUM_SCALAR >::setDrawnAtRandom().
|
protected |
Definition at line 80 of file gibbsOperator.h.
|
protected |
Definition at line 82 of file gibbsOperator.h.
|
protected |
Definition at line 85 of file gibbsOperator.h.
|
protected |
Definition at line 81 of file gibbsOperator.h.
|
protected |
Definition at line 83 of file gibbsOperator.h.