Spectral clustering.
More...
#include <CRNSpectralClustering.h>
Spectral clustering.
Spectral clustering using Ng, Jordan & Weiss formula
- Author
- Yann LEYDIER
- Date
- September 2012
- Version
- 0.1
Definition at line 49 of file CRNSpectralClustering.h.
Clustering with global fixed scale.
Clustering with local scale
- Exceptions
-
- Parameters
-
[in] | distance_matrix | the distance matrix of the data |
[in] | sigma | the scale for Gaussian smoothing of the distance matrix |
[in] | epsilon | the maximal distance between two elements (if distance > epsilon, then the elements cannot be in the same class) |
Definition at line 146 of file CRNSpectralClustering.cpp.
SpectralClustering SpectralClustering::CreateGlobalScaleFromDimension |
( |
const SquareMatrixDouble & |
distance_matrix, |
|
|
size_t |
dimension, |
|
|
double |
epsilon = std::numeric_limits<double>::max() |
|
) |
| |
|
static |
Clustering with global automatic scale.
Clustering with global auto scale
- Exceptions
-
- Parameters
-
[in] | distance_matrix | the distance matrix of the data |
[in] | dimension | the dimension of the original data |
[in] | epsilon | the maximal distance between two elements (if distance > epsilon, then the elements cannot be in the same class) |
Definition at line 119 of file CRNSpectralClustering.cpp.
SpectralClustering SpectralClustering::CreateGlobalScaleFromNN |
( |
const SquareMatrixDouble & |
distance_matrix, |
|
|
size_t |
sigma_neighborhood = 1 , |
|
|
double |
epsilon = std::numeric_limits<double>::max() |
|
) |
| |
|
static |
Clustering with global automatic scale.
Clustering with global auto scale
- Exceptions
-
- Parameters
-
[in] | distance_matrix | the distance matrix of the data |
[in] | sigma_neighborhood | the number of neighbors used to compute the local sigma |
[in] | epsilon | the maximal distance between two elements (if distance > epsilon, then the elements cannot be in the same class) |
Definition at line 84 of file CRNSpectralClustering.cpp.
SpectralClustering SpectralClustering::CreateLocalScaleFromNN |
( |
const SquareMatrixDouble & |
distance_matrix, |
|
|
size_t |
sigma_neighborhood = 7 , |
|
|
double |
epsilon = std::numeric_limits<double>::max() |
|
) |
| |
|
static |
Clustering with local automatic scale.
Clustering with local auto scale
- Exceptions
-
- Parameters
-
[in] | distance_matrix | the distance matrix of the data |
[in] | sigma_neighborhood | the number of neighbors used to compute the local sigma |
[in] | epsilon | the maximal distance between two elements (if distance > epsilon, then the elements cannot be in the same class) |
Definition at line 42 of file CRNSpectralClustering.cpp.
size_t SpectralClustering::EstimateClusterNumber |
( |
double |
limit = 1.0 | ) |
const |
Estimates the number of clusters.
Estimates the number of clusters
- Exceptions
-
- Parameters
-
[in] | limit | the minimal eigenvalue to select. Normally it should be 1.0, but computational errors can make it necessary to use 0.9 for example. |
- Returns
- the number of classes and optimal dimension of the projected data
Definition at line 206 of file CRNSpectralClustering.cpp.
const std::multimap<double, MatrixDouble>& crn::SpectralClustering::GetEigenpairs |
( |
| ) |
const |
|
inlinenoexcept |
Gets the data projected on each coordinates (higher eigenvalues are associated the to most significant coordinates)
Definition at line 67 of file CRNSpectralClustering.h.
std::vector< double > SpectralClustering::GetEigenvalues |
( |
| ) |
const |
Returns the eigenvalues (sorted from highest to lowest)
Returns the eigenvalues (sorted from highest to lowest)
- Returns
- the eigenvalues sorted from highest to lowest
Definition at line 192 of file CRNSpectralClustering.cpp.
std::vector< std::vector< double > > SpectralClustering::ProjectData |
( |
size_t |
ncoordinates, |
|
|
bool |
normalize |
|
) |
| const |
Projects the data on the first coordinates.
Projects the data on the first coordinates
- Exceptions
-
- Parameters
-
[in] | ncoordinates | the dimension of the projection space |
[in] | normalize | shall the elements be normalized on the unit circle? |
- Returns
- a vector of projected elements
Definition at line 226 of file CRNSpectralClustering.cpp.
The documentation for this class was generated from the following files: