59 template <
typename GRAPH_CHANGES_
SELECTOR >
61 selector.setGraph(dag);
63 unsigned int nb_changes_applied = 1;
69 nb_changes_applied = 0;
73 const auto& change = selector.bestChange();
74 delta_score = selector.deltaScore(change,
true);
77 selector.applyChange(change);
78 nb_changes_applied = 1;
82 }
while (nb_changes_applied);
89 selector.finalizeGraph(dag);
95 template < GUM_Numeric GUM_SCALAR,
typename GRAPH_CHANGES_
SELECTOR,
typename PARAM_ESTIMATOR >
97 PARAM_ESTIMATOR& estimator,
A class that, given a structure and a parameter estimator returns a full Bayes net.
void updateApproximationScheme(unsigned int incr=1)
Update the scheme w.r.t the new error and increment steps.
bool continueApproximationScheme(double error)
Update the scheme w.r.t the new error.
void initApproximationScheme()
Initialise the scheme.
void stopApproximationScheme()
Stop the approximation scheme.
Exception : the element we looked for cannot be found.
static BayesNet< GUM_SCALAR > createBN(ParamEstimator &estimator, const DAG &dag)
create a BN from a DAG using a one pass generator (typically ML)
DAG learnStructure(GRAPH_CHANGES_SELECTOR &selector, DAG initial_dag=DAG())
learns the structure of a Bayes net
BayesNet< GUM_SCALAR > learnBN(GRAPH_CHANGES_SELECTOR &selector, PARAM_ESTIMATOR &estimator, DAG initial_dag=DAG())
learns the structure and the parameters of a BN
the classes to account for structure changes in a graph
The greedy hill learning algorithm (for directed graphs).
include the inlined functions if necessary
gum is the global namespace for all aGrUM entities