aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
gum::StructuralComparator Class Reference

A class for comparing graphs based on their structures. More...

#include <structuralComparator.h>

Collaboration diagram for gum::StructuralComparator:

Public Member Functions

Constructors / Destructors
 StructuralComparator ()
 default constructor
 ~StructuralComparator ()
 destructor
Accessors
void compare (const DiGraph &ref, const DiGraph &test)
 compare two DiGraphs
void compare (const UndiGraph &ref, const UndiGraph &test)
 compare two UndiGraphs
void compare (const PDAG &ref, const PDAG &test)
 compare two PDAGs
template<typename GS1, typename GS2>
void compare (const BayesNet< GS1 > &ref, const BayesNet< GS2 > &test)
 compare two BNs based on their DAG
template<typename GUM_SCALAR>
void compare (const BayesNet< GUM_SCALAR > &ref, const PDAG &test)
 compare a PDAG with the essential graph of a reference BN
template<typename GUM_SCALAR>
void compare (const PDAG &ref, const BayesNet< GUM_SCALAR > &test)
 compare the essential graph of a BN with a reference PDAG
double precision_skeleton () const
 Measures for the skeleton, aka graph without orientations.
double recall_skeleton () const
 compare two DiGraphs
double f_score_skeleton () const
 compare two DiGraphs
double precision () const
 Measures for the graphs.
double recall () const
 compare two DiGraphs
double f_score () const
 compare two DiGraphs

Private Attributes

double _true_edge_
 Confusion matrix.
double _true_arc_
double _true_none_
double _wrong_edge_arc_
double _wrong_edge_none_
double _wrong_arc_edge_
double _wrong_arc_none_
double _misoriented_arc_
double _wrong_none_edge_
double _wrong_none_arc_

Detailed Description

A class for comparing graphs based on their structures.

Definition at line 63 of file structuralComparator.h.

Constructor & Destructor Documentation

◆ StructuralComparator()

gum::StructuralComparator::StructuralComparator ( )

default constructor

◆ ~StructuralComparator()

gum::StructuralComparator::~StructuralComparator ( )

destructor

Member Function Documentation

◆ compare() [1/6]

template<typename GS1, typename GS2>
void gum::StructuralComparator::compare ( const BayesNet< GS1 > & ref,
const BayesNet< GS2 > & test )

compare two BNs based on their DAG

◆ compare() [2/6]

template<typename GUM_SCALAR>
void gum::StructuralComparator::compare ( const BayesNet< GUM_SCALAR > & ref,
const PDAG & test )

compare a PDAG with the essential graph of a reference BN

◆ compare() [3/6]

void gum::StructuralComparator::compare ( const DiGraph & ref,
const DiGraph & test )

compare two DiGraphs

◆ compare() [4/6]

template<typename GUM_SCALAR>
void gum::StructuralComparator::compare ( const PDAG & ref,
const BayesNet< GUM_SCALAR > & test )

compare the essential graph of a BN with a reference PDAG

◆ compare() [5/6]

void gum::StructuralComparator::compare ( const PDAG & ref,
const PDAG & test )

compare two PDAGs

◆ compare() [6/6]

void gum::StructuralComparator::compare ( const UndiGraph & ref,
const UndiGraph & test )

compare two UndiGraphs

◆ f_score()

double gum::StructuralComparator::f_score ( ) const

compare two DiGraphs

◆ f_score_skeleton()

double gum::StructuralComparator::f_score_skeleton ( ) const

compare two DiGraphs

◆ precision()

double gum::StructuralComparator::precision ( ) const

Measures for the graphs.

◆ precision_skeleton()

double gum::StructuralComparator::precision_skeleton ( ) const

Measures for the skeleton, aka graph without orientations.

◆ recall()

double gum::StructuralComparator::recall ( ) const

compare two DiGraphs

◆ recall_skeleton()

double gum::StructuralComparator::recall_skeleton ( ) const

compare two DiGraphs

Member Data Documentation

◆ _misoriented_arc_

double gum::StructuralComparator::_misoriented_arc_
private

Definition at line 128 of file structuralComparator.h.

◆ _true_arc_

double gum::StructuralComparator::_true_arc_
private

Definition at line 126 of file structuralComparator.h.

◆ _true_edge_

double gum::StructuralComparator::_true_edge_
private

Confusion matrix.

Definition at line 126 of file structuralComparator.h.

◆ _true_none_

double gum::StructuralComparator::_true_none_
private

Definition at line 126 of file structuralComparator.h.

◆ _wrong_arc_edge_

double gum::StructuralComparator::_wrong_arc_edge_
private

Definition at line 128 of file structuralComparator.h.

◆ _wrong_arc_none_

double gum::StructuralComparator::_wrong_arc_none_
private

Definition at line 128 of file structuralComparator.h.

◆ _wrong_edge_arc_

double gum::StructuralComparator::_wrong_edge_arc_
private

Definition at line 127 of file structuralComparator.h.

◆ _wrong_edge_none_

double gum::StructuralComparator::_wrong_edge_none_
private

Definition at line 127 of file structuralComparator.h.

◆ _wrong_none_arc_

double gum::StructuralComparator::_wrong_none_arc_
private

Definition at line 129 of file structuralComparator.h.

◆ _wrong_none_edge_

double gum::StructuralComparator::_wrong_none_edge_
private

Definition at line 129 of file structuralComparator.h.


The documentation for this class was generated from the following file: