50#ifndef GUM_LEARNING_STRUCTURAL_METRICS_H
51#define GUM_LEARNING_STRUCTURAL_METRICS_H
91 template <
typename GS1,
typename GS2 >
95 template < GUM_Numeric GUM_SCALAR >
96 void compare(
const BayesNet< GUM_SCALAR >& ref,
const PDAG& test);
99 template < GUM_Numeric GUM_SCALAR >
100 void compare(
const PDAG& ref,
const BayesNet< GUM_SCALAR >& test);
125 template <
typename GS1,
typename GS2 >
Class representing Bayesian networks.
Base classes for partially directed acyclic graphs.
Class representing a Bayesian network.
Base class for all oriented graphs.
Base class for partially directed acyclic graphs.
double _wrong_edge_arc_
Confusion matrix.
StructuralMetrics()
default constructor
double fn_skeleton() const
Confusion matrix.
double tp() const
Measures for the graphs.
double _true_arc_
Confusion matrix.
void compare(const UndiGraph &ref, const UndiGraph &test)
compare two UndiGraphs (nodes matched by NodeId, no alignment)
double _misoriented_arc_
Confusion matrix.
double recall_skeleton() const
Confusion matrix.
void compare(const PDAG &ref, const PDAG &test)
compare two PDAGs (nodes matched by NodeId, no alignment)
double precision() const
Confusion matrix.
double shd_skeleton() const
Confusion matrix.
double recall() const
Confusion matrix.
double _wrong_edge_none_
Confusion matrix.
double fp() const
Confusion matrix.
double _wrong_arc_edge_
Confusion matrix.
double fn() const
Confusion matrix.
double _wrong_none_arc_
Confusion matrix.
double sid(const BayesNet< GS1 > &ref, const BayesNet< GS2 > &test) const
SID overload comparing the DAGs of two BNs (NOT their essential graphs).
double tn() const
Confusion matrix.
double fp_skeleton() const
Confusion matrix.
void compare(const PDAG &ref, const BayesNet< GUM_SCALAR > &test)
compare the essential graph of a BN with a reference PDAG (nodes matched by NodeId,...
void compare(const BayesNet< GS1 > &ref, const BayesNet< GS2 > &test)
compare two BNs via their essential graphs (nodes matched by variable name). For a DAG-level BN compa...
double precision_skeleton() const
Confusion matrix.
double f_score_skeleton() const
Confusion matrix.
void compare(const BayesNet< GUM_SCALAR > &ref, const PDAG &test)
compare a PDAG with the essential graph of a reference BN (nodes matched by NodeId,...
double f_score() const
Confusion matrix.
double _wrong_arc_none_
Confusion matrix.
void compare(const DiGraph &ref, const DiGraph &test)
compare two DiGraphs (nodes matched by NodeId, no alignment)
double _true_edge_
Confusion matrix.
double _wrong_none_edge_
Confusion matrix.
~StructuralMetrics()
destructor
double _true_none_
Confusion matrix.
double sid(const DAG &ref, const DAG &test) const
Confusion matrix.
Size _size_
Number of nodes in the compared graphs (set by compare()).
double shd() const
Confusion matrix.
double tp_skeleton() const
Measures for the skeleton, aka graph without orientations.
double tn_skeleton() const
Confusion matrix.
Base class for undirected graphs.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
gum is the global namespace for all aGrUM entities