47#ifndef GUM_LEARNING_DBROW_GENERATOR_EM_H
48#define GUM_LEARNING_DBROW_GENERATOR_EM_H
96 template <
typename GUM_SCALAR =
double >
107 const BayesNet< GUM_SCALAR >& bn,
161#ifndef DOXYGEN_SHOULD_SKIP_THIS
168 std::vector< std::size_t > _missing_cols_;
171 std::size_t _nb_miss_;
174 Tensor< GUM_SCALAR > _joint_proba_;
186 DBRow< DBTranslatedValue > _filled_row1_;
189 DBRow< DBTranslatedValue > _filled_row2_;
192 bool _use_filled_row1_{
true};
195 double _original_weight_;
A DBRowGenerator class that returns incomplete rows as EM would do.
Base class for DBRowGenerator classes that use a BN for computing their outputs.
Class representing a Bayesian network.
Class for assigning/browsing values to tuples of discrete variables.
DBRowGeneratorEM< GUM_SCALAR > * clone() const final
virtual copy constructor
DBRowGeneratorEM(const std::vector< DBTranslatedValueType > &column_types, const BayesNet< GUM_SCALAR > &bn, const Bijection< NodeId, std::size_t > &nodeId2columns=Bijection< NodeId, std::size_t >())
default constructor
DBRowGeneratorEM(const DBRowGeneratorEM< GUM_SCALAR > &from)
copy constructor
DBRowGeneratorEM(DBRowGeneratorEM< GUM_SCALAR > &&from)
move constructor
virtual const DBRow< DBTranslatedValue > & generate() override final
generates one ouput DBRow for each DBRow passed to method setInputRow
virtual std::size_t computeRows_(const DBRow< DBTranslatedValue > &row) override final
computes the rows it will provide as output
virtual void setBayesNet(const BayesNet< GUM_SCALAR > &new_bn) override final
assign a new Bayes net to the generator
DBRowGeneratorWithBN(const std::vector< DBTranslatedValueType > &column_types, const BayesNet< double > &bn, const DBRowGeneratorGoal goal, const Bijection< NodeId, std::size_t > &nodeId2columns=Bijection< NodeId, std::size_t >())
The class for storing a record in a database.
include the inlined functions if necessary
gum is the global namespace for all aGrUM entities
The union class for storing the translated values in learning databases.