![]() |
aGrUM 3.1.1
a C++ library for (probabilistic) graphical models
|
<agrum/FMDP/learning/core/contingencyTable.h> More...
#include <contingencyTable.h>
Public Member Functions | |
| ContingencyTable< GUM_ELEMENT_A, GUM_ELEMENT_B > & | operator+= (const ContingencyTable< GUM_ELEMENT_A, GUM_ELEMENT_B > &src) |
| std::string | toString () const |
Constructor & destructor. | |
| ContingencyTable () | |
| Default constructor. | |
| ~ContingencyTable () | |
| Default destructor. | |
| void * | operator new (size_t s) |
| Allocators and Deallocators redefinition. | |
| void | operator delete (void *p) |
| Default constructor. | |
| void | add (GUM_ELEMENT_A valueA, GUM_ELEMENT_B valueB) |
| Increments the number of sample for case( iattr, ivalue ). | |
| Idx | joint (GUM_ELEMENT_A valueA, GUM_ELEMENT_B valueB) const |
| Returns the number of samples for case (iattr, ivalue). | |
| Idx | attrAMarginal (GUM_ELEMENT_A valueA) const |
| Returns the number of samples for case (iattr, ivalue). | |
| Idx | attrBMarginal (GUM_ELEMENT_B valueB) const |
| Returns the number of samples for case (iattr, ivalue). | |
| HashTableConstIteratorSafe< GUM_ELEMENT_A, Idx > | attrABeginSafe () const |
| Returns the number of samples for line iattr. | |
| HashTableConstIteratorSafe< GUM_ELEMENT_A, Idx > | attrAEndSafe () const |
| Increments the number of sample for case( iattr, ivalue ). | |
| HashTableConstIteratorSafe< GUM_ELEMENT_B, Idx > | attrBBeginSafe () const |
| Returns the number of samples for column ivalue. | |
| HashTableConstIteratorSafe< GUM_ELEMENT_B, Idx > | attrBEndSafe () const |
| Increments the number of sample for case( iattr, ivalue ). | |
| Idx | attrASize () const |
| Returns the number of samples for line iattr. | |
| Idx | attrBSize () const |
| Returns the number of samples for column ivalue. | |
Private Attributes | |
| HashTable< std::pair< GUM_ELEMENT_A, GUM_ELEMENT_B >, Idx > | _jointTable_ |
| The contingency table used to compute the GStat Left Idx is for the attribute Right Idx for the value. | |
| HashTable< GUM_ELEMENT_A, Idx > | _attrAMarginalTable_ |
| HashTable< GUM_ELEMENT_B, Idx > | _attrBMarginalTable_ |
<agrum/FMDP/learning/core/contingencyTable.h>
Definition at line 71 of file contingencyTable.h.
| gum::ContingencyTable< GUM_ELEMENT_A, GUM_ELEMENT_B >::ContingencyTable | ( | ) |
Default constructor.
Definition at line 66 of file contingencyTable_tpl.h.
References ContingencyTable().
Referenced by ContingencyTable(), ~ContingencyTable(), operator delete(), and operator+=().
| gum::ContingencyTable< GUM_ELEMENT_A, GUM_ELEMENT_B >::~ContingencyTable | ( | ) |
Default destructor.
Definition at line 74 of file contingencyTable_tpl.h.
References ContingencyTable().
| void gum::ContingencyTable< GUM_ELEMENT_A, GUM_ELEMENT_B >::add | ( | GUM_ELEMENT_A | valueA, |
| GUM_ELEMENT_B | valueB ) |
Increments the number of sample for case( iattr, ivalue ).
Definition at line 86 of file contingencyTable_tpl.h.
References _attrAMarginalTable_.
| HashTableConstIteratorSafe< GUM_ELEMENT_A, Idx > gum::ContingencyTable< GUM_ELEMENT_A, GUM_ELEMENT_B >::attrABeginSafe | ( | ) | const |
Returns the number of samples for line iattr.
Definition at line 154 of file contingencyTable_tpl.h.
References _attrAMarginalTable_.
| HashTableConstIteratorSafe< GUM_ELEMENT_A, Idx > gum::ContingencyTable< GUM_ELEMENT_A, GUM_ELEMENT_B >::attrAEndSafe | ( | ) | const |
Increments the number of sample for case( iattr, ivalue ).
Definition at line 160 of file contingencyTable_tpl.h.
References _attrAMarginalTable_.
| Idx gum::ContingencyTable< GUM_ELEMENT_A, GUM_ELEMENT_B >::attrAMarginal | ( | GUM_ELEMENT_A | valueA | ) | const |
Returns the number of samples for case (iattr, ivalue).
Definition at line 143 of file contingencyTable_tpl.h.
References _attrAMarginalTable_.
| Idx gum::ContingencyTable< GUM_ELEMENT_A, GUM_ELEMENT_B >::attrASize | ( | ) | const |
Returns the number of samples for line iattr.
Definition at line 177 of file contingencyTable_tpl.h.
References _attrAMarginalTable_.
| HashTableConstIteratorSafe< GUM_ELEMENT_B, Idx > gum::ContingencyTable< GUM_ELEMENT_A, GUM_ELEMENT_B >::attrBBeginSafe | ( | ) | const |
Returns the number of samples for column ivalue.
Definition at line 166 of file contingencyTable_tpl.h.
References _attrBMarginalTable_.
| HashTableConstIteratorSafe< GUM_ELEMENT_B, Idx > gum::ContingencyTable< GUM_ELEMENT_A, GUM_ELEMENT_B >::attrBEndSafe | ( | ) | const |
Increments the number of sample for case( iattr, ivalue ).
Definition at line 172 of file contingencyTable_tpl.h.
References _attrBMarginalTable_.
| Idx gum::ContingencyTable< GUM_ELEMENT_A, GUM_ELEMENT_B >::attrBMarginal | ( | GUM_ELEMENT_B | valueB | ) | const |
Returns the number of samples for case (iattr, ivalue).
Definition at line 148 of file contingencyTable_tpl.h.
References _attrAMarginalTable_.
| Idx gum::ContingencyTable< GUM_ELEMENT_A, GUM_ELEMENT_B >::attrBSize | ( | ) | const |
Returns the number of samples for column ivalue.
Definition at line 182 of file contingencyTable_tpl.h.
References _attrBMarginalTable_.
| Idx gum::ContingencyTable< GUM_ELEMENT_A, GUM_ELEMENT_B >::joint | ( | GUM_ELEMENT_A | valueA, |
| GUM_ELEMENT_B | valueB ) const |
Returns the number of samples for case (iattr, ivalue).
Definition at line 135 of file contingencyTable_tpl.h.
Referenced by gum::ContingencyTable< Idx, GUM_ELEMENT >::joint().
| void gum::ContingencyTable< GUM_ELEMENT_A, GUM_ELEMENT_B >::operator delete | ( | void * | p | ) |
Default constructor.
Definition at line 130 of file contingencyTable_tpl.h.
References ContingencyTable().
| void * gum::ContingencyTable< GUM_ELEMENT_A, GUM_ELEMENT_B >::operator new | ( | size_t | s | ) |
Allocators and Deallocators redefinition.
Definition at line 125 of file contingencyTable_tpl.h.
| ContingencyTable< GUM_ELEMENT_A, GUM_ELEMENT_B > & gum::ContingencyTable< GUM_ELEMENT_A, GUM_ELEMENT_B >::operator+= | ( | const ContingencyTable< GUM_ELEMENT_A, GUM_ELEMENT_B > & | src | ) |
Definition at line 102 of file contingencyTable_tpl.h.
References ContingencyTable().
| std::string gum::ContingencyTable< GUM_ELEMENT_A, GUM_ELEMENT_B >::toString | ( | ) | const |
Definition at line 187 of file contingencyTable_tpl.h.
References _attrAMarginalTable_, _attrBMarginalTable_, and _jointTable_.
|
private |
Definition at line 161 of file contingencyTable.h.
Referenced by add(), attrABeginSafe(), attrAEndSafe(), attrAMarginal(), attrASize(), attrBMarginal(), and toString().
|
private |
Definition at line 162 of file contingencyTable.h.
Referenced by attrBBeginSafe(), attrBEndSafe(), attrBSize(), and toString().
|
private |
The contingency table used to compute the GStat Left Idx is for the attribute Right Idx for the value.
NB: This is a silly and in a hurry implementation of contingency table If someone ever use this class and has time to correctly implements a efficient contingency table, you're welcome
Definition at line 160 of file contingencyTable.h.
Referenced by toString().