DynamicNMIDistance.h
Go to the documentation of this file.
1 /*
2  * DynamicNMIDistance.h
3  *
4  * Created on: Jun 26, 2013
5  * Author: Henning
6  */
7
8 #ifndef DYNAMICNMIDISTANCE_H_
9 #define DYNAMICNMIDISTANCE_H_
10
11 #include "DissimilarityMeasure.h"
12 #include "NMIDistance.h"
13
14 namespace NetworKit {
15
16 typedef std::vector<std::vector<count> > Matrix;
17
22 public:
23
31  double getDissimilarity(const Graph& newGraph, const Partition& oldClustering, const Partition& newClustering);
32
33  void combineValues(double H_sum, double MI, double& NMI, double& NMID) const;
34  void sanityCheck(double& NMI, double& NMID) const;
35
36  double entropy(const Partition& clustering, count n, std::vector<double> probs);
37
38  bool isInBoth(node u, const Partition& oldClustering, const Partition& newClustering);
39
40  Matrix confusionMatrix(const Graph& G, const Partition& zeta, const Partition& eta);
41 };
42
43 } /* namespace NetworKit */
44 #endif /* DYNAMICNMIDISTANCE_H_ */
Matrix confusionMatrix(const Graph &G, const Partition &zeta, const Partition &eta)
Definition: DynamicNMIDistance.cpp:187
void sanityCheck(double &NMI, double &NMID) const
Definition: DynamicNMIDistance.cpp:163
Definition: DynamicNMIDistance.h:21
Base class for all clustering dissimilarity measures.
Definition: DissimilarityMeasure.h:21
Implements a partition of a set, i.e.
Definition: Partition.h:31
bool isInBoth(node u, const Partition &oldClustering, const Partition &newClustering)
Definition: DynamicNMIDistance.cpp:15
uint64_t count
Definition: Globals.h:21
std::vector< std::vector< count > > Matrix
Definition: DynamicNMIDistance.h:16
double getDissimilarity(const Graph &newGraph, const Partition &oldClustering, const Partition &newClustering)
Computes NMI between two clusterings that belong to two different graphs.
Definition: DynamicNMIDistance.cpp:26
index node
Definition: Globals.h:23
double entropy(const Partition &clustering, count n, std::vector< double > probs)
Definition: DynamicNMIDistance.cpp:141
A graph (with optional weights) and parallel iterator methods.
Definition: Graph.h:79
void combineValues(double H_sum, double MI, double &NMI, double &NMID) const
Definition: DynamicNMIDistance.cpp:132