25 #ifndef GUM_LEARNING_A_PRIORI_DIRICHLET_FROM_DATABASE_H 26 #define GUM_LEARNING_A_PRIORI_DIRICHLET_FROM_DATABASE_H 43 template <
template <
typename >
class ALLOC = std::allocator >
140 virtual const std::string&
getType() const final;
163 std::vector<
double, ALLOC<
double > >& counts) final;
171 const
IdSet< ALLOC >& idset,
172 std::vector<
double, ALLOC<
double > >& counts) final;
177 #ifndef DOXYGEN_SHOULD_SKIP_THIS 187 double __internal_weight;
virtual bool isOfType(const std::string &type) final
indicates whether an apriori is of a certain type
virtual AprioriDirichletFromDatabase< ALLOC > * clone() const
virtual copy constructor
the base class for all a priori
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
gum is the global namespace for all aGrUM entities
virtual bool isInformative() const final
indicates whether the apriori is potentially informative
A dirichlet priori: computes its N'_ijk from a database.
The class that computes countings of observations from the database.
A dirichlet priori: computes its N'_ijk from a database.
The class that computes countings of observations from the database.
virtual void setWeight(const double weight) final
sets the weight of the a priori (kind of effective sample size)
double weight() const
returns the weight assigned to the apriori
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 ~AprioriDirichletFromDatabase()
destructor
Set of pairs of elements with fast search for both elements.
AprioriDirichletFromDatabase(const DatabaseTable< ALLOC > &learning_db, const DBRowGeneratorParser< ALLOC > &apriori_parser, 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
The class representing a tabular database as used by learning tasks.
virtual const std::string & getType() const final
returns the type of the apriori
ALLOC< NodeId > allocator_type
type for the allocators passed in arguments of methods
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
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.
ALLOC< NodeId > allocator_type
type for the allocators passed in arguments of methods
AprioriDirichletFromDatabase< ALLOC > & operator=(const AprioriDirichletFromDatabase< ALLOC > &from)
copy operator