TTK
Loading...
Searching...
No Matches
ClusteringMetrics.h
Go to the documentation of this file.
1
16
17#pragma once
18
19#include <vector>
20// ttk common includes
21#include <Debug.h>
22
23namespace ttk {
24
30 class ClusteringMetrics : virtual public Debug {
31
32 public:
34
35 int execute(const int *clustering1,
36 const int *clustering2,
37 const size_t n,
38 double &nmiValue,
39 double &ariValue) const;
40
41 int
42 computeContingencyTables(const int *clust1,
43 const int *clust2,
44 const size_t nPoint,
45 std::vector<std::vector<int>> &contingencyMatrix,
46 std::vector<int> &sumLin,
47 std::vector<int> &sumCol) const;
48
49 // For single ARI or single NMI computing, the contingency matrix, as well
50 // as the sums of each lines and each column must be provided as arguments.
51 int computeARI(const std::vector<std::vector<int>> &contingencyMatrix,
52 const std::vector<int> &sumLin,
53 const std::vector<int> &sumCol,
54 const size_t nPoint,
55 double &ariValue) const;
56 int computeNMI(const std::vector<std::vector<int>> &contingencyMatrix,
57 const std::vector<int> &sumLin,
58 const std::vector<int> &sumCol,
59 const size_t nPoint,
60 double &nmiValue) const;
61 }; // ClusteringMetrics class
62
63} // namespace ttk
int computeARI(const std::vector< std::vector< int > > &contingencyMatrix, const std::vector< int > &sumLin, const std::vector< int > &sumCol, const size_t nPoint, double &ariValue) const
int computeContingencyTables(const int *clust1, const int *clust2, const size_t nPoint, std::vector< std::vector< int > > &contingencyMatrix, std::vector< int > &sumLin, std::vector< int > &sumCol) const
int computeNMI(const std::vector< std::vector< int > > &contingencyMatrix, const std::vector< int > &sumLin, const std::vector< int > &sumCol, const size_t nPoint, double &nmiValue) const
int execute(const int *clustering1, const int *clustering2, const size_t n, double &nmiValue, double &ariValue) const
Minimalist debugging class.
Definition: Debug.h:88
The Topology ToolKit.