29 #ifndef GUM_LEARNING_INDEP_TEST_CHI2_H 30 #define GUM_LEARNING_INDEP_TEST_CHI2_H 47 template <
template <
typename >
class ALLOC = std::allocator >
84 const std::vector< std::pair< std::size_t, std::size_t >,
85 ALLOC< std::pair< std::size_t, std::size_t > > >&
162 std::pair< double, double >
165 const std::vector<
NodeId, ALLOC< NodeId > >& rhs_ids = {});
180 #ifndef DOXYGEN_SHOULD_SKIP_THIS 184 std::vector< std::size_t, ALLOC< std::size_t > > __domain_sizes;
190 const std::vector< Idx > __empty_set;
200 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS std::pair< double, double > _statistics(const IdSet< ALLOC > &idset)
compute the pair <chi2 statistic,pvalue>
virtual IndepTestChi2< ALLOC > * clone() const
virtual copy constructor
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
ALLOC< NodeId > allocator_type
type for the allocators passed in arguments of methods
The base class for all the independence tests used for learning.
IndepTestChi2(const DBRowGeneratorParser< ALLOC > &parser, const Apriori< ALLOC > &external_apriori, const std::vector< std::pair< std::size_t, std::size_t >, ALLOC< std::pair< std::size_t, std::size_t > > > &ranges, const Bijection< NodeId, std::size_t, ALLOC< std::size_t > > &nodeId2columns=Bijection< NodeId, std::size_t, ALLOC< std::size_t > >(), const allocator_type &alloc=allocator_type())
default constructor
IndepTestChi2< ALLOC > & operator=(const IndepTestChi2< ALLOC > &from)
copy operator
ALLOC< NodeId > allocator_type
type for the allocators passed in arguments of methods
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
the class for computing Chi2 independence test scores
A class for storing a pair of sets of NodeIds, the second one corresponding to a conditional set...
the base class for all a priori
const std::vector< std::pair< std::size_t, std::size_t >, ALLOC< std::pair< std::size_t, std::size_t > > > & ranges() const
returns the current ranges
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
std::pair< double, double > statistics(NodeId var1, NodeId var2, const std::vector< NodeId, ALLOC< NodeId > > &rhs_ids={})
get the pair <chi2 statistic,pvalue> for a test var1 indep var2 given rhs_ids
Represent the chi2 distribution.
Set of pairs of elements with fast search for both elements.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
virtual double _score(const IdSet< ALLOC > &idset) final
returns the score for a given IdSet
virtual ~IndepTestChi2()
destructor
the class used to read a row in the database and to transform it into a set of DBRow instances that c...
Size NodeId
Type for node ids.