aGrUM 3.2.0
a C++ library for (probabilistic) graphical models
KTBNAdaptiveLearner.h File Reference

A k-TBN learner that also selects the order k from the data. More...

#include <limits>
#include <memory>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#include <agrum/agrum.h>
#include <agrum/KTBN/KTBN.h>
#include <agrum/KTBN/learning/KTBNLearner.h>
#include <string_view>
#include <unordered_set>
#include <agrum/KTBN/learning/KTBNAdaptiveLearner_tpl.h>
Include dependency graph for KTBNAdaptiveLearner.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  gum::learning::KTBNAdaptiveLearner< GUM_SCALAR >
 Learns a k-TBN (order k + structure + parameters) from trajectory CSVs. More...

Namespaces

namespace  gum
 gum is the global namespace for all aGrUM entities
namespace  gum::learning
 include the inlined functions if necessary

Variables

template class GUM_PUBLIC_KTBN gum::learning::KTBNAdaptiveLearner< double >

Detailed Description

A k-TBN learner that also selects the order k from the data.

gum::learning::KTBNAdaptiveLearner is the k-selecting counterpart of gum::learning::KTBNLearner: instead of being given the order \(k\), it explores every candidate \(k \in [k_{min}, k_{max}]\), learns one k-TBN per candidate and keeps the best one according to a model-selection criterion. \(k_{min}\) starts at 2 and is raised automatically by the structural-constraint setters (see below); it is never given directly.

It implements the same configuration interface as KTBNLearner (gum::learning::IKTBNLearner) but its setters do not apply anything immediately: since no \(k\) is fixed yet, they only record the requested configuration into plain string-based sets / attributes. At learn time, that recorded configuration is replayed onto a freshly-constructed KTBNLearner for each candidate \(k\):

  • constraints whose slice indices do not fit the current candidate (slice \(\geq k\)) are skipped for that candidate only;
  • constraints naming an unknown base variable are rejected eagerly, at setter-call time (same behaviour as BNLearner / KTBNLearner);
  • a forbidden/mandatory arc, possible edge, or no-parent/no-children node naming a concrete slice \(t\) also raises \(k_{min}\) to \(t+1\), so learnKTBN() skips candidates that would only end up silently dropping it instead of learning them for nothing.
Author
Seth AGUILA & Anis KHACEF

Definition in file KTBNAdaptiveLearner.h.