52#ifndef GUM_LEARNING_CHI2_H
53#define GUM_LEARNING_CHI2_H
61#define GUM_LEARNING_CONFIDENCE_PROBA 0.05
91 Chi2(
const std::vector< std::size_t >& var_modalities,
#define GUM_LEARNING_CONFIDENCE_PROBA
The class that represents the chi2 distribution.
Chi2 & operator=(const Chi2 &)=delete
Forbid used of the copy operator.
double _confidence_proba_
The confidence probability used for critical values.
Size _conditioning_size_
The domain size of the conditioning nodes.
double criticalValue(const std::pair< Idx, Idx > &pair)
Computes the critical value according to the number of degrees of freedom.
HashTable< Idx, double > _critical_values_
A set of already computed critical values.
Chi2(const Chi2 &)=delete
Forbid use of the copy constructor.
void setConfidenceProba(double new_proba)
Modifies the confidence probability.
const std::vector< std::size_t > & _modalities_
The modalities of the random variables.
void setConditioningNodes(const std::vector< Idx > &db_conditioning_ids)
Sets the conditioning nodes (useful for computing degrees of freedom).
static double _probaZValue_(double z)
Computes the probability of normal z value.
Size degreesOfFreedom(const std::pair< Idx, Idx > &pair)
Returns the number of degrees of freedom.
static double _criticalValue_(double proba, Size df)
Computes the critical value of a given chi2 test (used by the cache).
Chi2(const std::vector< std::size_t > &var_modalities, double confidence_proba=GUM_LEARNING_CONFIDENCE_PROBA)
Default constructor.
static double probaChi2(double x, Size df)
Computes the probability of chi2 value.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Size Idx
Type for indexes.
Class hash tables iterators.
gum is the global namespace for all aGrUM entities