27 #ifndef GUM_LEARNING_A_PRIORI_BDEU_H 28 #define GUM_LEARNING_A_PRIORI_BDEU_H 32 #include <agrum/agrum.h> 33 #include <agrum/BN/learning/aprioris/apriori.h> 52 template <
template <
typename >
class ALLOC = std::allocator >
88 AprioriBDeu(
const AprioriBDeu< ALLOC >& from,
const allocator_type& alloc);
94 AprioriBDeu(AprioriBDeu< ALLOC >&& from,
const allocator_type& alloc);
128 virtual void setWeight(
const double weight)
final;
134 virtual bool isOfType(
const std::string& type)
final;
156 std::vector<
double, ALLOC<
double > >& counts)
final;
164 std::vector<
double, ALLOC<
double > >& counts)
final;
174 #include <agrum/BN/learning/aprioris/aprioriBDeu_tpl.h> virtual void addAllApriori(const IdCondSet< ALLOC > &idset, std::vector< double, ALLOC< double > > &counts) final
adds the apriori to a counting vector corresponding to the idset
virtual AprioriBDeu< ALLOC > * clone() const
virtual copy constructor
AprioriBDeu< ALLOC > & operator=(const AprioriBDeu< ALLOC > &from)
copy operator
virtual ~AprioriBDeu()
destructor
INLINE void emplace(Args &&... args)
AprioriBDeu(const AprioriBDeu< ALLOC > &from)
copy constructor
virtual const std::string & getType() const final
returns the type of the apriori
virtual void addConditioningApriori(const IdCondSet< 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 allocator_type &alloc) const
virtual copy constructor with a given allocator
AprioriBDeu(const AprioriBDeu< ALLOC > &from, const allocator_type &alloc)
copy constructor with a given allocator
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 ())
AprioriBDeu< ALLOC > & operator=(AprioriBDeu< ALLOC > &&from)
move operator
virtual bool isInformative() const final
indicates whether the apriori is potentially informative
virtual bool isOfType(const std::string &type) final
indicates whether an apriori is of a certain type
Database(const std::string &filename, const BayesNet< GUM_SCALAR > &bn, const std::vector< std::string > &missing_symbols)
AprioriBDeu(AprioriBDeu< ALLOC > &&from, const allocator_type &alloc)
move constructor with a given allocator
AprioriBDeu(AprioriBDeu< ALLOC > &&from)
move constructor
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'