47#ifndef GUM_LEARNING_PRIOR_DIRICHLET_FROM_BN_H
48#define GUM_LEARNING_PRIOR_DIRICHLET_FROM_BN_H
65 template <
typename GUM_SCALAR >
154 std::vector<
double >& counts);
161#include <agrum/BN/learning/priors/DirichletPriorFromBN_tpl.h>
Class representing a Bayesian network.
Class for assigning/browsing values to tuples of discrete variables.
The class representing a tabular database as used by learning tasks.
DirichletPriorFromBN(DirichletPriorFromBN &&from) noexcept
move constructor
void _addCountsForJoint_(Instantiation &Ijoint, const Set< NodeId > &joint, std::vector< double > &counts)
DirichletPriorFromBN * clone() const final
virtual copy constructor
PriorType getType() const final
returns the type of the prior
void addJointPseudoCount(const IdCondSet &idset, std::vector< double > &counts) final
adds the prior to a counting vector corresponding to the idset
const BayesNet< GUM_SCALAR > * _prior_bn_
void setWeight(double weight) final
sets the weight of the a prior(kind of virtual sample size)
void addConditioningPseudoCount(const IdCondSet &idset, std::vector< double > &counts) final
adds the prior to a counting vector defined over the right hand side of the idset
DirichletPriorFromBN(const DirichletPriorFromBN &from)
copy constructor
DirichletPriorFromBN(const DatabaseTable &learning_db, const BayesNet< GUM_SCALAR > *priorbn)
default constructor
bool isInformative() const final
indicates whether the prior is tensorly informative
A class for storing a pair of sets of NodeIds, the second one corresponding to a conditional set.
Prior(const DatabaseTable &database, const Bijection< NodeId, std::size_t > &nodeId2columns=Bijection< NodeId, std::size_t >())
default constructor
double weight() const
returns the weight assigned to the prior
Size NodeId
Type for node ids.
Implementation of a Shafer-Shenoy's-like version of lazy propagation for inference in Bayesian networ...
include the inlined functions if necessary
the base class for all a priori