public class SpectralClustering extends Object
Constructor and Description |
---|
SpectralClustering(double[][] W,
int k)
Constructor.
|
SpectralClustering(double[][] data,
int k,
double sigma)
Constructor.
|
SpectralClustering(double[][] data,
int l,
int k,
double sigma)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
distortion()
Returns the distortion in feature space.
|
int[] |
getClusterLabel()
Returns the cluster labels of data.
|
int[] |
getClusterSize()
Returns the size of clusters.
|
double |
getGaussianKernelWidth()
Returns the width of Gaussian kernel.
|
int |
getNumClusters()
Returns the number of clusters.
|
String |
toString() |
public SpectralClustering(double[][] W, int k)
W
- the adjacency matrix of graph.k
- the number of clusters.public SpectralClustering(double[][] data, int k, double sigma)
data
- the dataset for clustering.k
- the number of clusters.sigma
- the smooth/width parameter of Gaussian kernel, which
is a somewhat sensitive parameter. To search for the best setting,
one may pick the value that gives the tightest clusters (smallest
distortion, see distortion()
) in feature space.public SpectralClustering(double[][] data, int l, int k, double sigma)
data
- the dataset for clustering.l
- the number of random samples for Nystrom approximation.k
- the number of clusters.sigma
- the smooth/width parameter of Gaussian kernel, which
is a somewhat sensitive parameter. To search for the best setting,
one may pick the value that gives the tightest clusters (smallest
distortion, see distortion()
) in feature space.public int getNumClusters()
public int[] getClusterLabel()
public int[] getClusterSize()
public double getGaussianKernelWidth()
public double distortion()
Copyright © 2015. All rights reserved.