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

Common configuration interface for k-TBN learners. More...

#include <cctype>
#include <filesystem>
#include <fstream>
#include <numeric>
#include <string>
#include <utility>
#include <vector>
#include <agrum/agrum.h>
#include <agrum/base/database/CSVParser.h>
#include <agrum/KTBN/KTBN.h>
#include <string_view>
#include <unordered_set>
#include <agrum/KTBN/learning/IKTBNLearner_tpl.h>
Include dependency graph for IKTBNLearner.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  gum::learning::IKTBNLearner< GUM_SCALAR >
 Pure-virtual configuration interface shared by all k-TBN learners. 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::IKTBNLearner< double >

Detailed Description

Common configuration interface for k-TBN learners.

gum::learning::IKTBNLearner is the pure-virtual interface shared by every k-TBN learner. It declares only the configuration surface — the score, algorithm, MIIC-correction, prior and structural-constraint setters — and says nothing about how, or for which \(k\), a model is learned.

Two classes implement it:

  • gum::learning::KTBNLearner: a fixed- \(k\) learner. Its setters apply each setting to the right internal BNLearner immediately.
  • gum::learning::KTBNAdaptiveLearner: a learner that also selects \(k\). Its setters merely record the requested configuration, to be replayed on a freshly-built KTBNLearner for every candidate \(k\) (constraints whose slices do not fit a given \(k\) are skipped for that \(k\) only).

The single shared learning entry point learnKTBN() is part of the interface. Deliberately excluded, since they assume a single fixed \(k\) or have no meaningful answer on the adaptive learner: learnParameters(), the diagnostics (k(), toString(), state(), ...) and the database accessors.

Constraints are addressed by name only (engine names such as "X[1]" or "C", or an explicit (base, slice) pair): a bare NodeId is meaningless at this level because the underlying NodeId spaces differ from one \(k\) to another.

The fluent setters return IKTBNLearner& ; each concrete class overrides them with a covariant reference to its own type, so call chaining keeps the concrete type.

Author
Seth AGUILA & Anis KHACEF

Definition in file IKTBNLearner.h.