27 #ifndef GUM_LEARNING_K2_H 28 #define GUM_LEARNING_K2_H 33 #include <agrum/BN/BayesNet.h> 34 #include <agrum/tools/core/sequence.h> 35 #include <agrum/tools/graphs/DAG.h> 36 #include <agrum/BN/learning/greedyHillClimbing.h> 89 void setOrder(
const Sequence< NodeId >& order);
92 void setOrder(
const std::vector< NodeId >& order);
104 template <
typename GRAPH_CHANGES_SELECTOR >
108 template <
typename GUM_SCALAR,
typename GRAPH_CHANGES_SELECTOR,
typename PARAM_ESTIMATOR >
129 #ifndef GUM_NO_INLINE 130 # include <agrum/BN/learning/K2_inl.h> 134 #include <agrum/BN/learning/K2_tpl.h> ApproximationScheme & approximationScheme()
returns the approximation policy of the learning algorithm
INLINE void emplace(Args &&... args)
Sequence< NodeId > _order_
the order on the variable used for learning
void _checkOrder_(const std::vector< Size > &modal)
checks that the order passed to K2 is coherent with the variables as specified by their modalities ...
K2(const K2 &from)
copy constructor
const Sequence< NodeId > & order() const noexcept
returns the current order
void setOrder(const std::vector< NodeId > &order)
sets the order on the variables
K2(K2 &&from)
move constructor
K2 & operator=(const K2 &from)
copy operator
DAG learnStructure(GRAPH_CHANGES_SELECTOR &selector, DAG initial_dag=DAG())
learns the structure of a Bayes net
Database(const std::string &filename, const BayesNet< GUM_SCALAR > &bn, const std::vector< std::string > &missing_symbols)
K2 & operator=(K2 &&from)
move operator
BayesNet< GUM_SCALAR > learnBN(GRAPH_CHANGES_SELECTOR &selector, PARAM_ESTIMATOR &estimator, DAG initial_dag=DAG())
learns the structure and the parameters of a BN