28 #ifndef GUM_LEARNING_A_PRIORI_BDEU_H 29 #define GUM_LEARNING_A_PRIORI_BDEU_H 53 template <
template <
typename >
class ALLOC = std::allocator >
139 virtual const std::string&
getType() const final;
159 std::vector<
double, ALLOC<
double > >& counts) final;
167 const
IdSet< ALLOC >& idset,
168 std::vector<
double, ALLOC<
double > >& counts) final;
178 #include <agrum/learning/aprioris/aprioriBDeu_tpl.h> virtual void addConditioningApriori(const IdSet< ALLOC > &idset, std::vector< double, ALLOC< double > > &counts) final
adds the apriori to a counting vectordefined over the right hand side of the idset ...
virtual AprioriBDeu< ALLOC > * clone() const
virtual copy constructor
AprioriBDeu< ALLOC > & operator=(const AprioriBDeu< ALLOC > &from)
copy operator
virtual ~AprioriBDeu()
destructor
virtual const std::string & getType() const final
returns the type of the apriori
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
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
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
the internal apriori for the BDeu score (N' / (r_i * q_i)BDeu is a BD score with a N'/(r_i * q_i) apr...
virtual void setWeight(const double weight) final
sets the effective sample size N' (alias of setEffectiveSampleSize ())
virtual void addAllApriori(const IdSet< ALLOC > &idset, std::vector< double, ALLOC< double > > &counts) final
adds the apriori to a counting vector corresponding to the idset
double weight() const
returns the weight assigned to the apriori
virtual bool isInformative() const final
indicates whether the apriori is potentially informative
Set of pairs of elements with fast search for both elements.
The class representing a tabular database as used by learning tasks.
virtual bool isOfType(const std::string &type) final
indicates whether an apriori is of a certain type
ALLOC< NodeId > allocator_type
type for the allocators passed in arguments of methods
ALLOC< NodeId > allocator_type
type for the allocators passed in arguments of methods
Size NodeId
Type for node ids.
AprioriBDeu(const DatabaseTable< ALLOC > &database, 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
void setEffectiveSampleSize(const double weight)
sets the effective sample size N'