public class SpectralClustering extends PartitionClustering implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
double |
distortion
The distortion in feature space.
|
k, OUTLIER, size, y| Constructor and Description |
|---|
SpectralClustering(double distortion,
int k,
int[] y)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static SpectralClustering |
fit(smile.math.matrix.DenseMatrix W,
int k)
Spectral graph clustering.
|
static SpectralClustering |
fit(smile.math.matrix.DenseMatrix W,
int k,
int maxIter,
double tol)
Spectral graph clustering.
|
static SpectralClustering |
fit(double[][] data,
int k,
double sigma)
Spectral clustering the data.
|
static SpectralClustering |
fit(double[][] data,
int k,
double sigma,
int maxIter,
double tol)
Spectral clustering the data.
|
static SpectralClustering |
fit(double[][] data,
int k,
int l,
double sigma)
Spectral clustering with Nystrom approximation.
|
static SpectralClustering |
fit(double[][] data,
int k,
int l,
double sigma,
int maxIter,
double tol)
Spectral clustering with Nystrom approximation.
|
run, seed, toStringpublic SpectralClustering(double distortion,
int k,
int[] y)
distortion - the total distortion.k - the number of clusters.y - the cluster labels.public static SpectralClustering fit(smile.math.matrix.DenseMatrix W, int k)
W - the adjacency matrix of graph, which will be modified.k - the number of clusters.public static SpectralClustering fit(smile.math.matrix.DenseMatrix W, int k, int maxIter, double tol)
W - the adjacency matrix of graph, which will be modified.k - the number of clusters.maxIter - the maximum number of iterations for k-means.tol - the tolerance of k-means convergence test.public static SpectralClustering fit(double[][] data, int k, double sigma)
data - the input data of which each row is an observation.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) in feature space.public static SpectralClustering fit(double[][] data, int k, double sigma, int maxIter, double tol)
data - the input data of which each row is an observation.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) in feature space.maxIter - the maximum number of iterations for k-means.tol - the tolerance of k-means convergence test.public static SpectralClustering fit(double[][] data, int k, int l, double sigma)
data - the input data of which each row is an observation.k - the number of clusters.l - the number of random samples for Nystrom approximation.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) in feature space.public static SpectralClustering fit(double[][] data, int k, int l, double sigma, int maxIter, double tol)
data - the input data of which each row is an observation.k - the number of clusters.l - the number of random samples for Nystrom approximation.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) in feature space.maxIter - the maximum number of iterations for k-means.tol - the tolerance of k-means convergence test.