30 #ifndef GUM_MULTI_DIM_FUNCTION_GRAPH_LEAST_SQUARE_TEST_POLICY_H 31 #define GUM_MULTI_DIM_FUNCTION_GRAPH_LEAST_SQUARE_TEST_POLICY_H 34 #include <agrum/FMDP/learning/core/contingencyTable.h> 35 #include <agrum/FMDP/learning/core/testPolicy/ITestPolicy.h> 37 #include <agrum/tools/multidim/utils/FunctionGraphUtilities/link.h> 51 template <
typename GUM_SCALAR >
64 GUM_CONSTRUCTOR(LeastSquareTestPolicy);
71 return SmallObjectAllocator::instance().allocate(s);
74 SmallObjectAllocator::instance().deallocate(p,
75 sizeof(LeastSquareTestPolicy));
186 #include <agrum/FMDP/learning/core/testPolicy/leastSquareTestPolicy_tpl.h> const HashTable< Idx, LinkedList< double > *> & obsTable() const
Returns global sum (needed for the merging)
double score()
Returns the performance of current variable according to the test.
void operator delete(void *p)
Constructor.
const HashTable< Idx, Idx > & nbObsTable() const
Returns nbobs per modality table (needed for the merging)
virtual ~LeastSquareTestPolicy()
Destructor.
HashTable< Idx, double > sumAttrTable__
Sum for each modality assumed by variable.
double secondaryscore() const
Returns a second criterion to severe ties.
const HashTable< Idx, double > & sumAttrTable() const
Returns sum per modality table (needed for the merging)
INLINE void emplace(Args &&... args)
void add(const LeastSquareTestPolicy< GUM_SCALAR > &src)
Performs the merging of current LeastSquareTestPolicy instance with given instance.
double sumValue() const
Returns global sum (needed for the merging)
bool isTestRelevant() const
Returns true if enough observation were made so that the test can be relevant.
void addObservation(Idx attr, GUM_SCALAR value)
Comptabilizes the new observation.
HashTable< Idx, Idx > nbObsTable__
Nb Observation for each modality assumed by variable.
LeastSquareTestPolicy()
Constructor.
double score__
Keeping computed score.
void computeScore()
Returns the performance of current variable according to the test.
void * operator new(size_t s)
Allocators and Deallocators redefinition.