aGrUM  0.16.0
DAG2BNLearner.h
Go to the documentation of this file.
1 
29 #ifndef GUM_LEARNING_DAG_2_BN_LEARNER_H
30 #define GUM_LEARNING_DAG_2_BN_LEARNER_H
31 
32 #include <vector>
33 
34 #include <agrum/agrum.h>
37 #include <agrum/BN/BayesNet.h>
38 #include <agrum/graphs/DAG.h>
40 
41 namespace gum {
42 
43  namespace learning {
44 
51  template < template < typename > class ALLOC = std::allocator >
53  : public ApproximationScheme
54  , private ALLOC< NodeId > {
55  public:
57  using allocator_type = ALLOC< NodeId >;
58 
59  // ##########################################################################
61  // ##########################################################################
63 
66 
69 
72  const allocator_type& alloc);
73 
76 
79 
81  virtual DAG2BNLearner< ALLOC >* clone() const;
82 
84  virtual DAG2BNLearner< ALLOC >* clone(const allocator_type& alloc) const;
85 
87  virtual ~DAG2BNLearner();
88 
90 
91 
92  // ##########################################################################
94  // ##########################################################################
95 
97 
100 
103 
105 
106 
107  // ##########################################################################
109  // ##########################################################################
111 
113  template < typename GUM_SCALAR = double >
115  const DAG& dag);
116 
118 
122  template < typename GUM_SCALAR = double >
124  ParamEstimator< ALLOC >& general_estimator,
125  const DAG& dag);
126 
129 
132 
134 
135 #ifndef DOXYGEN_SHOULD_SKIP_THIS
136 
137  private:
139 
141  template < typename GUM_SCALAR = double >
142  static void
143  __probaVarReordering(gum::Potential< GUM_SCALAR >& pot,
144  const gum::Potential< GUM_SCALAR >& other_pot);
145 
146 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
147  };
148 
149  } /* namespace learning */
150 
151 } /* namespace gum */
152 
155 
156 #endif /* GUM_LEARNING_DAG_2_BN_LEARNER_H */
aGrUM&#39;s Potential is a multi-dimensional array with tensor operators.
Definition: potential.h:60
Class representing a Bayesian Network.
Definition: BayesNet.h:78
static BayesNet< GUM_SCALAR > createBN(ParamEstimator< ALLOC > &estimator, const DAG &dag)
create a BN from a DAG using a one pass generator (typically ML)
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Approximation Scheme.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
virtual ~DAG2BNLearner()
destructor
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
allocator_type getAllocator() const
returns the allocator used by the score
ALLOC< NodeId > allocator_type
type for the allocators passed in arguments of methods
Definition: DAG2BNLearner.h:57
DAG2BNLearner< ALLOC > & operator=(const DAG2BNLearner< ALLOC > &from)
copy operator
ApproximationScheme & approximationScheme()
returns the approximation policy of the learning algorithm
virtual DAG2BNLearner< ALLOC > * clone() const
virtual copy constructor
A class that, given a structure and a parameter estimator returns a full Bayes net.
Definition: DAG2BNLearner.h:52
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
The base class for estimating parameters of CPTs.
Base class for dag.
Definition: DAG.h:102
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
DAG2BNLearner(const allocator_type &alloc=allocator_type())
default constructor