47#ifndef GUM_LEARNING_PRIOR_H
48#define GUM_LEARNING_PRIOR_H
75 return "Error in prior";
The class representing a tabular database as used by learning tasks.
A class for storing a pair of sets of NodeIds, the second one corresponding to a conditional set.
virtual bool isInformative() const =0
indicates whether the prior is tensorly informative
Prior(Prior &&from)
move constructor
virtual void addJointPseudoCount(const IdCondSet &idset, std::vector< double > &counts)=0
adds the prior to a counting vector corresponding to the idset
Prior & operator=(const Prior &from)
copy operator
virtual void setWeight(double weight)
sets the weight of the a prior(kind of effective sample size)
Prior(const Prior &from)
copy constructor
Prior(const DatabaseTable &database, const Bijection< NodeId, std::size_t > &nodeId2columns=Bijection< NodeId, std::size_t >())
default constructor
const DatabaseTable * database_
a reference to the database in order to have access to its variables
double weight_
the weight of the prior
virtual PriorType getType() const =0
returns the type of the prior
virtual ~Prior()
destructor
Bijection< NodeId, std::size_t > nodeId2columns_
a mapping from the NodeIds of the variables to the indices of the columns in the database
Prior & operator=(Prior &&from)
move operator
virtual Prior * clone() const =0
virtual copy constructor
double weight() const
returns the weight assigned to the prior
virtual void addConditioningPseudoCount(const IdCondSet &idset, std::vector< double > &counts)=0
adds the prior to a counting vector defined over the right hand side of the idset
The class representing a tabular database stored in RAM.
A class used by learning caches to represent uniquely sets of variables.
include the inlined functions if necessary
constexpr const char * priorTypeToString(PriorType e) noexcept
gum is the global namespace for all aGrUM entities
the base class for all a prioris