8#ifndef META_OCEAN_MATH_SPECTRAL_CLUSTERING_H
9#define META_OCEAN_MATH_SPECTRAL_CLUSTERING_H
58 template<
bool tSimplify>
68 template<
bool tSimplify>
89 return firstElem.first > secondElem.first;
This class implements spectral clustering.
Definition ClusteringSpectral.h:22
ClusteringSpectral(const Matrix &affinityMatrix, const unsigned int numberCluster)
Determines the symmetric Laplacian matrix of input given and computes the eigen system of the Laplaci...
Matrix reducedEigenvectors
Column matrix of eigen vectors ordered by eigen values and reduced to [numberCluster] vectors.
Definition ClusteringSpectral.h:83
static Matrix determineRandomWalkLaplacianMatrix(const Matrix &affinityMatrix)
Determines normalized graph Laplacian matrix closely connected to a random walk.
static Matrix determineLaplacianMatrix(const Matrix &affinityMatrix)
Determines unnormalized graph Laplacian matrix.
static Matrix determineSymmetricLaplacianMatrix(const Matrix &affinityMatrix)
Determines symmetric (normalized) graph Laplacian matrix.
static bool pairSortDescending(const std::pair< T, MatrixT< T > > &firstElem, const std::pair< T, MatrixT< T > > &secondElem)
Sorts a list of eigenvectors with corresponding eigenvalues in descending order.
Definition ClusteringSpectral.h:87
std::vector< Indices32 > clusterRotation(const unsigned int iterations=100u, const Scalar convergenceThreshold=Scalar(0.0001))
Performances the actual clustering.
float Scalar
Definition of a scalar type.
Definition Math.h:129
The namespace covering the entire Ocean framework.
Definition Accessor.h:15