aGrUM  0.16.0
paramEstimatorML.h
Go to the documentation of this file.
1 
28 #ifndef GUM_LEARNING_PARAM_ESTIMATOR_ML_H
29 #define GUM_LEARNING_PARAM_ESTIMATOR_ML_H
30 
31 #include <sstream>
32 
33 #include <agrum/agrum.h>
35 
36 namespace gum {
37 
38  namespace learning {
39 
45  template < template < typename > class ALLOC = std::allocator >
46  class ParamEstimatorML : public ParamEstimator< ALLOC > {
47  public:
49  using allocator_type = ALLOC< NodeId >;
50 
51  // ##########################################################################
53  // ##########################################################################
55 
57 
81  const DBRowGeneratorParser< ALLOC >& parser,
82  const Apriori< ALLOC >& external_apriori,
83  const Apriori< ALLOC >& score_internal__apriori,
84  const std::vector< std::pair< std::size_t, std::size_t >,
85  ALLOC< std::pair< std::size_t, std::size_t > > >&
86  ranges,
87  const Bijection< NodeId, std::size_t, ALLOC< std::size_t > >&
88  nodeId2columns =
89  Bijection< NodeId, std::size_t, ALLOC< std::size_t > >(),
90  const allocator_type& alloc = allocator_type());
91 
93 
111  const DBRowGeneratorParser< ALLOC >& parser,
112  const Apriori< ALLOC >& external_apriori,
113  const Apriori< ALLOC >& score_internal__apriori,
114  const Bijection< NodeId, std::size_t, ALLOC< std::size_t > >&
115  nodeId2columns =
116  Bijection< NodeId, std::size_t, ALLOC< std::size_t > >(),
117  const allocator_type& alloc = allocator_type());
118 
121 
124  const allocator_type& alloc);
125 
128 
131  const allocator_type& alloc);
132 
134  virtual ParamEstimatorML< ALLOC >* clone() const;
135 
137  virtual ParamEstimatorML< ALLOC >* clone(const allocator_type& alloc) const;
138 
140  virtual ~ParamEstimatorML();
141 
143 
144 
145  // ##########################################################################
147  // ##########################################################################
148 
150 
153 
156 
158 
159 
160  // ##########################################################################
162  // ##########################################################################
164 
166 
168 
175  virtual std::vector< double, ALLOC< double > > parameters(
176  const NodeId target_node,
177  const std::vector< NodeId, ALLOC< NodeId > >& conditioning_nodes);
178 
180  };
181 
182  } /* namespace learning */
183 
184 } /* namespace gum */
185 
188 
189 #endif /* GUM_LEARNING_PARAM_ESTIMATOR_ML_H */
the base class for all a priori
Definition: apriori.h:50
virtual ~ParamEstimatorML()
destructor
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
const std::vector< std::pair< std::size_t, std::size_t >, ALLOC< std::pair< std::size_t, std::size_t > > > & ranges() const
returns the current ranges
ParamEstimatorML(const DBRowGeneratorParser< ALLOC > &parser, const Apriori< ALLOC > &external_apriori, const Apriori< ALLOC > &score_internal__apriori, const std::vector< std::pair< std::size_t, std::size_t >, ALLOC< std::pair< std::size_t, std::size_t > > > &ranges, 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
ParamEstimatorML< ALLOC > & operator=(const ParamEstimatorML< ALLOC > &from)
copy operator
ALLOC< NodeId > allocator_type
type for the allocators passed in arguments of methods
virtual ParamEstimatorML< ALLOC > * clone() const
virtual copy constructor
Set of pairs of elements with fast search for both elements.
Definition: bijection.h:1805
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
ALLOC< NodeId > allocator_type
type for the allocators passed in arguments of methods
virtual std::vector< double, ALLOC< double > > parameters(const NodeId target_node, const std::vector< NodeId, ALLOC< NodeId > > &conditioning_nodes)
returns the CPT&#39;s parameters corresponding to a given nodeset
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
The base class for estimating parameters of CPTs.
The class for estimating parameters of CPTs using Maximum Likelihood.
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.
Definition: graphElements.h:98