![]() |
aGrUM 3.0.0
a C++ library for (probabilistic) graphical models
|
A class for comparing graphs based on their structures. More...
#include <structuralMetrics.h>
Public Member Functions | |
Constructors / Destructors | |
| StructuralMetrics () | |
| default constructor | |
| ~StructuralMetrics () | |
| destructor | |
Accessors | |
| double | _true_edge_ |
| Confusion matrix. | |
| double | _true_arc_ |
| Confusion matrix. | |
| double | _true_none_ |
| Confusion matrix. | |
| double | _wrong_edge_arc_ |
| Confusion matrix. | |
| double | _wrong_edge_none_ |
| Confusion matrix. | |
| double | _wrong_arc_edge_ |
| Confusion matrix. | |
| double | _wrong_arc_none_ |
| Confusion matrix. | |
| double | _misoriented_arc_ |
| Confusion matrix. | |
| double | _wrong_none_edge_ |
| Confusion matrix. | |
| double | _wrong_none_arc_ |
| Confusion matrix. | |
| Size | _size_ |
| Number of nodes in the compared graphs (set by compare()). | |
| void | compare (const DiGraph &ref, const DiGraph &test) |
| compare two DiGraphs (nodes matched by NodeId, no alignment) | |
| void | compare (const UndiGraph &ref, const UndiGraph &test) |
| compare two UndiGraphs (nodes matched by NodeId, no alignment) | |
| void | compare (const PDAG &ref, const PDAG &test) |
| compare two PDAGs (nodes matched by NodeId, no alignment) | |
| template<typename GS1, typename GS2> | |
| 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 comparison, align NodeIds manually and use compare(DiGraph, DiGraph) with bn.dag(). | |
| template<GUM_Numeric GUM_SCALAR> | |
| 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, no name-based alignment) | |
| template<GUM_Numeric GUM_SCALAR> | |
| 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, no name-based alignment) | |
| double | tp_skeleton () const |
| Measures for the skeleton, aka graph without orientations. | |
| double | fp_skeleton () const |
| Confusion matrix. | |
| double | fn_skeleton () const |
| Confusion matrix. | |
| double | tn_skeleton () const |
| Confusion matrix. | |
| double | precision_skeleton () const |
| Confusion matrix. | |
| double | recall_skeleton () const |
| Confusion matrix. | |
| double | f_score_skeleton () const |
| Confusion matrix. | |
| double | shd_skeleton () const |
| Confusion matrix. | |
| double | tp () const |
| Measures for the graphs. | |
| double | fp () const |
| Confusion matrix. | |
| double | fn () const |
| Confusion matrix. | |
| double | tn () const |
| Confusion matrix. | |
| double | precision () const |
| Confusion matrix. | |
| double | recall () const |
| Confusion matrix. | |
| double | f_score () const |
| Confusion matrix. | |
| double | shd () const |
| Confusion matrix. | |
| double | sid (const DAG &ref, const DAG &test) const |
| Confusion matrix. | |
| template<typename GS1, typename GS2> | |
| double | sid (const BayesNet< GS1 > &ref, const BayesNet< GS2 > &test) const |
| SID overload comparing the DAGs of two BNs (NOT their essential graphs). | |
A class for comparing graphs based on their structures.
Definition at line 63 of file structuralMetrics.h.
| gum::StructuralMetrics::StructuralMetrics | ( | ) |
default constructor
| gum::StructuralMetrics::~StructuralMetrics | ( | ) |
destructor
| void gum::StructuralMetrics::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 comparison, align NodeIds manually and use compare(DiGraph, DiGraph) with bn.dag().
compare two DiGraphs (nodes matched by NodeId, no alignment)
compare two PDAGs (nodes matched by NodeId, no alignment)
compare two UndiGraphs (nodes matched by NodeId, no alignment)
| double gum::StructuralMetrics::f_score | ( | ) | const |
Confusion matrix.
| double gum::StructuralMetrics::f_score_skeleton | ( | ) | const |
Confusion matrix.
| double gum::StructuralMetrics::fn | ( | ) | const |
Confusion matrix.
| double gum::StructuralMetrics::fn_skeleton | ( | ) | const |
Confusion matrix.
| double gum::StructuralMetrics::fp | ( | ) | const |
Confusion matrix.
| double gum::StructuralMetrics::fp_skeleton | ( | ) | const |
Confusion matrix.
| double gum::StructuralMetrics::precision | ( | ) | const |
Confusion matrix.
| double gum::StructuralMetrics::precision_skeleton | ( | ) | const |
Confusion matrix.
| double gum::StructuralMetrics::recall | ( | ) | const |
Confusion matrix.
| double gum::StructuralMetrics::recall_skeleton | ( | ) | const |
Confusion matrix.
| double gum::StructuralMetrics::shd | ( | ) | const |
Confusion matrix.
| double gum::StructuralMetrics::shd_skeleton | ( | ) | const |
Confusion matrix.
| double gum::StructuralMetrics::sid | ( | const BayesNet< GS1 > & | ref, |
| const BayesNet< GS2 > & | test ) const |
SID overload comparing the DAGs of two BNs (NOT their essential graphs).
| double gum::StructuralMetrics::tn | ( | ) | const |
Confusion matrix.
| double gum::StructuralMetrics::tn_skeleton | ( | ) | const |
Confusion matrix.
| double gum::StructuralMetrics::tp | ( | ) | const |
Measures for the graphs.
| double gum::StructuralMetrics::tp_skeleton | ( | ) | const |
Measures for the skeleton, aka graph without orientations.
|
private |
Confusion matrix.
Definition at line 147 of file structuralMetrics.h.
|
private |
Number of nodes in the compared graphs (set by compare()).
Definition at line 152 of file structuralMetrics.h.
|
private |
Confusion matrix.
Definition at line 145 of file structuralMetrics.h.
|
private |
Confusion matrix.
Definition at line 145 of file structuralMetrics.h.
|
private |
Confusion matrix.
Definition at line 145 of file structuralMetrics.h.
|
private |
Confusion matrix.
Definition at line 147 of file structuralMetrics.h.
|
private |
Confusion matrix.
Definition at line 147 of file structuralMetrics.h.
|
private |
Confusion matrix.
Definition at line 146 of file structuralMetrics.h.
|
private |
Confusion matrix.
Definition at line 146 of file structuralMetrics.h.
|
private |
Confusion matrix.
Definition at line 148 of file structuralMetrics.h.
|
private |
Confusion matrix.
Definition at line 148 of file structuralMetrics.h.