TTK
Loading...
Searching...
No Matches
ttk::DimensionReductionMetrics Class Reference

TTK base class that computes different scores for the quality of a dimension reduction. More...

#include <DimensionReductionMetrics.h>

Inheritance diagram for ttk::DimensionReductionMetrics:
ttk::Debug ttk::BaseClass ttkDimensionReductionMetrics

Classes

struct  Metrics
 

Public Member Functions

 DimensionReductionMetrics ()
 
void execute (std::vector< std::vector< double > > const &input, std::vector< std::vector< double > > const &latent)
 Main entry point.
 
Metrics get () const
 
- Public Member Functions inherited from ttk::Debug
 Debug ()
 
 ~Debug () override
 
virtual int setDebugLevel (const int &debugLevel)
 
int setWrapper (const Wrapper *wrapper) override
 
int printMsg (const std::string &msg, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::vector< std::string > &msgs, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printErr (const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
 
int printWrn (const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const int &threads, const double &memory, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const int &threads, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const debug::Priority &priority, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::vector< std::vector< std::string > > &rows, const debug::Priority &priority=debug::Priority::INFO, const bool hasHeader=true, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const debug::Separator &separator, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::INFO, std::ostream &stream=std::cout) const
 
int printMsg (const debug::Separator &separator, const debug::Priority &priority, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const debug::Separator &separator, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::INFO, std::ostream &stream=std::cout) const
 
void setDebugMsgPrefix (const std::string &prefix)
 
- Public Member Functions inherited from ttk::BaseClass
 BaseClass ()
 
virtual ~BaseClass ()=default
 
int getThreadNumber () const
 
virtual int setThreadNumber (const int threadNumber)
 

Protected Attributes

double Wasserstein {2.}
 
int SampleSize {-1}
 
unsigned NeighborhoodSize {10}
 
double w0_ {0.}
 
double w1_ {0.}
 
double ta_ {0.}
 
double lc_ {0.}
 
double rmse_ {0.}
 
double trust_ {0.}
 
double cont_ {0.}
 
double lcmc_ {0.}
 
double mrreh_ {0.}
 
double mrrel_ {0.}
 
- Protected Attributes inherited from ttk::Debug
int debugLevel_
 
std::string debugMsgPrefix_
 
std::string debugMsgNamePrefix_
 
- Protected Attributes inherited from ttk::BaseClass
bool lastObject_
 
int threadNumber_
 
Wrapperwrapper_
 

Additional Inherited Members

- Protected Member Functions inherited from ttk::Debug
int printMsgInternal (const std::string &msg, const std::string &right, const std::string &filler, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsgInternal (const std::string &msg, const debug::Priority &priority, const debug::LineMode &lineMode, std::ostream &stream=std::cout) const
 
int welcomeMsg (std::ostream &stream)
 
- Static Protected Attributes inherited from ttk::Debug
static COMMON_EXPORTS debug::LineMode lastLineMode = ttk::debug::LineMode::NEW
 

Detailed Description

TTK base class that computes different scores for the quality of a dimension reduction.

Author
Mattéo Clémot matte.nosp@m.o.cl.nosp@m.emot@.nosp@m.univ.nosp@m.-lyon.nosp@m.1.fr
Date
September 2024.

This module defines the DimensionReductionMetrics class that computes different scores for the quality of a dimension reduction

See also
ttkDimensionReductionMetrics.cpp for a usage example.

Definition at line 21 of file DimensionReductionMetrics.h.

Constructor & Destructor Documentation

◆ DimensionReductionMetrics()

ttk::DimensionReductionMetrics::DimensionReductionMetrics ( )

Definition at line 8 of file DimensionReductionMetrics.cpp.

Member Function Documentation

◆ execute()

void ttk::DimensionReductionMetrics::execute ( std::vector< std::vector< double > > const & input,
std::vector< std::vector< double > > const & latent )

Main entry point.

Parameters
[in]inputFirst point cloud (typically the HD input)
[in]latentSecond point cloud (typically the LD representation)

Definition at line 13 of file DimensionReductionMetrics.cpp.

◆ get()

Metrics ttk::DimensionReductionMetrics::get ( ) const
inline

Definition at line 38 of file DimensionReductionMetrics.h.

Member Data Documentation

◆ cont_

double ttk::DimensionReductionMetrics::cont_ {0.}
protected

Continuity is penalized when neighbors in the input are not neighbors in the representation

Definition at line 81 of file DimensionReductionMetrics.h.

◆ lc_

double ttk::DimensionReductionMetrics::lc_ {0.}
protected

Linear correlation of pairwise distances between the input and the representation

Definition at line 69 of file DimensionReductionMetrics.h.

◆ lcmc_

double ttk::DimensionReductionMetrics::lcmc_ {0.}
protected

Local continuity meta criterion translates the similarity of neighborhoods in the input and the representation

Definition at line 85 of file DimensionReductionMetrics.h.

◆ mrreh_

double ttk::DimensionReductionMetrics::mrreh_ {0.}
protected

Mean relative rank error with respect to the ranks in the representation

Definition at line 89 of file DimensionReductionMetrics.h.

◆ mrrel_

double ttk::DimensionReductionMetrics::mrrel_ {0.}
protected

Mean relative rank error with respect to the ranks in the input

Definition at line 92 of file DimensionReductionMetrics.h.

◆ NeighborhoodSize

unsigned ttk::DimensionReductionMetrics::NeighborhoodSize {10}
protected

size "K" of the K-neighborhood used for the rank-based measures (trustworthiness, continuity, LCMC, MRRE)

Definition at line 52 of file DimensionReductionMetrics.h.

◆ rmse_

double ttk::DimensionReductionMetrics::rmse_ {0.}
protected

Root mean squared error between distance matrices of the input and the representation

Definition at line 73 of file DimensionReductionMetrics.h.

◆ SampleSize

int ttk::DimensionReductionMetrics::SampleSize {-1}
protected

size of the triplet sample for the triplet accuracy computation; if set to -1, all the N(N-1)(N-2)/6 triplets are used

Definition at line 48 of file DimensionReductionMetrics.h.

◆ ta_

double ttk::DimensionReductionMetrics::ta_ {0.}
protected

Triplet accuracy between the input and the representation, i.e. the percentage of triplets whose distances in both spaces have the same relative order

Definition at line 65 of file DimensionReductionMetrics.h.

◆ trust_

double ttk::DimensionReductionMetrics::trust_ {0.}
protected

Trustworthiness is penalized when neighbors in the representation are not neighbors in the input

Definition at line 77 of file DimensionReductionMetrics.h.

◆ w0_

double ttk::DimensionReductionMetrics::w0_ {0.}
protected

p-Wasserstein distance between the 0-dimensional persistence diagrams in both space (to the power p)

Definition at line 56 of file DimensionReductionMetrics.h.

◆ w1_

double ttk::DimensionReductionMetrics::w1_ {0.}
protected

p-Wasserstein distance between the 1-dimensional persistence diagrams in both space (to the power p)

Definition at line 60 of file DimensionReductionMetrics.h.

◆ Wasserstein

double ttk::DimensionReductionMetrics::Wasserstein {2.}
protected

"p" parameter used for the p-Wasserstein distances

Definition at line 44 of file DimensionReductionMetrics.h.


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