![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
<agrum/tools/multidim/core/testPolicy/leastSquareTestPolicy.h> More...
#include <leastSquareTestPolicy.h>
Public Member Functions | |
Constructor/Destrcutor | |
LeastSquareTestPolicy () | |
Constructor. More... | |
void * | operator new (size_t s) |
Allocators and Deallocators redefinition. More... | |
void | operator delete (void *p) |
Constructor. More... | |
virtual | ~LeastSquareTestPolicy () |
Destructor. More... | |
Observation insertion | |
void | addObservation (Idx attr, GUM_SCALAR value) |
Comptabilizes the new observation. More... | |
Test relevance | |
bool | isTestRelevant () const |
Returns true if enough observation were made so that the test can be relevant. More... | |
Test result | |
void | computeScore () |
Returns the performance of current variable according to the test. More... | |
double | score () |
Returns the performance of current variable according to the test. More... | |
double | secondaryscore () const |
Returns a second criterion to severe ties. More... | |
Observation methods | |
Idx | nbObservation () const |
Comptabilizes the new observation. More... | |
Test methods | |
virtual void | computeScore () const |
Recomputes the statistic from the beginning. More... | |
virtual double | score () const =0 |
Returns the performance of current variable according to the test. More... | |
Fusion Methods | |
void | add (const ITestPolicy< GUM_SCALAR > &src) |
Miscelleanous Methods | |
std::string | toString () const |
Protected Member Functions | |
bool | isModified_ () const |
Fusion Methods | |
double | _sumO_ |
Global sum. More... | |
HashTable< Idx, Idx > | _nbObsTable_ |
Nb Observation for each modality assumed by variable. More... | |
HashTable< Idx, double > | _sumAttrTable_ |
Sum for each modality assumed by variable. More... | |
HashTable< Idx, LinkedList< double > *> | _obsTable_ |
Not sure if needed. More... | |
double | _score_ |
Keeping computed score. More... | |
void | add (const LeastSquareTestPolicy< GUM_SCALAR > &src) |
Performs the merging of current LeastSquareTestPolicy instance with given instance. More... | |
double | sumValue () const |
Returns global sum (needed for the merging) More... | |
const HashTable< Idx, Idx > & | nbObsTable () const |
Returns nbobs per modality table (needed for the merging) More... | |
const HashTable< Idx, double > & | sumAttrTable () const |
Returns sum per modality table (needed for the merging) More... | |
const HashTable< Idx, LinkedList< double > *> & | obsTable () const |
Returns global sum (needed for the merging) More... | |
<agrum/tools/multidim/core/testPolicy/leastSquareTestPolicy.h>
LeastSquareTestPolicy implements a test policy that follows the Least Square statistic
Definition at line 52 of file leastSquareTestPolicy.h.
|
inline |
Constructor.
Definition at line 62 of file leastSquareTestPolicy.h.
|
virtual |
Destructor.
Definition at line 36 of file leastSquareTestPolicy_tpl.h.
References gum::Set< Key, Alloc >::emplace().
void gum::LeastSquareTestPolicy< GUM_SCALAR >::add | ( | const LeastSquareTestPolicy< GUM_SCALAR > & | src | ) |
Performs the merging of current LeastSquareTestPolicy instance with given instance.
Definition at line 121 of file leastSquareTestPolicy_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
inlineinherited |
Definition at line 139 of file ITestPolicy.h.
References gum::ITestPolicy< GUM_SCALAR >::_isModified_.
|
virtual |
Comptabilizes the new observation.
Reimplemented from gum::ITestPolicy< GUM_SCALAR >.
Definition at line 52 of file leastSquareTestPolicy_tpl.h.
References gum::Set< Key, Alloc >::emplace().
void gum::LeastSquareTestPolicy< GUM_SCALAR >::computeScore | ( | ) |
Returns the performance of current variable according to the test.
Definition at line 79 of file leastSquareTestPolicy_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
inlinevirtualinherited |
Recomputes the statistic from the beginning.
Reimplemented in gum::GTestPolicy< GUM_SCALAR >, and gum::Chi2TestPolicy< GUM_SCALAR >.
Definition at line 116 of file ITestPolicy.h.
References gum::ITestPolicy< GUM_SCALAR >::_isModified_.
|
inlineprotectedinherited |
Definition at line 164 of file ITestPolicy.h.
References gum::ITestPolicy< GUM_SCALAR >::_isModified_.
|
inlinevirtual |
Returns true if enough observation were made so that the test can be relevant.
Implements gum::ITestPolicy< GUM_SCALAR >.
Definition at line 101 of file leastSquareTestPolicy.h.
|
inlineinherited |
|
inline |
Returns nbobs per modality table (needed for the merging)
Definition at line 149 of file leastSquareTestPolicy.h.
|
inline |
Returns global sum (needed for the merging)
Definition at line 159 of file leastSquareTestPolicy.h.
|
inline |
Constructor.
Definition at line 70 of file leastSquareTestPolicy.h.
|
inline |
Allocators and Deallocators redefinition.
Definition at line 69 of file leastSquareTestPolicy.h.
double gum::LeastSquareTestPolicy< GUM_SCALAR >::score | ( | ) |
Returns the performance of current variable according to the test.
Definition at line 106 of file leastSquareTestPolicy_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
pure virtualinherited |
Returns the performance of current variable according to the test.
Implemented in gum::GTestPolicy< GUM_SCALAR >, and gum::Chi2TestPolicy< GUM_SCALAR >.
|
virtual |
Returns a second criterion to severe ties.
Implements gum::ITestPolicy< GUM_SCALAR >.
Definition at line 115 of file leastSquareTestPolicy_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
inline |
Returns sum per modality table (needed for the merging)
Definition at line 154 of file leastSquareTestPolicy.h.
|
inline |
|
inlineinherited |
Definition at line 155 of file ITestPolicy.h.
|
private |
Nb Observation for each modality assumed by variable.
Definition at line 166 of file leastSquareTestPolicy.h.
|
private |
Not sure if needed.
Definition at line 172 of file leastSquareTestPolicy.h.
|
private |
Keeping computed score.
Definition at line 175 of file leastSquareTestPolicy.h.
|
private |
Sum for each modality assumed by variable.
Definition at line 169 of file leastSquareTestPolicy.h.
|
private |
Global sum.
Definition at line 163 of file leastSquareTestPolicy.h.