public class DirectClustering extends Object implements Clustering
CriterionFunction
.
The I1Function
implements the standard K-Means criterion function. Others try to optimize
a variety of
different objectives.Modifier and Type | Field and Description |
---|---|
static String |
CRITERIA_PROPERTY
The property to set the name of a
CriterionFunction to use when
clustering the data. |
static String |
PROPERTY_PREFIX
A property prefix for specifiying options when using
DirectClustering . |
static String |
REPEAT_PROPERTY
The property to set the number of times a single run of
DirectClustering will be run. |
static String |
SEED_PROPERTY
A property for setting the
KMeansSeed algorithm to use. |
Constructor and Description |
---|
DirectClustering() |
Modifier and Type | Method and Description |
---|---|
static Assignments |
cluster(Matrix matrix,
int numClusters,
int numRepetitions)
|
static Assignments |
cluster(Matrix matrix,
int numClusters,
int numRepetitions,
CriterionFunction criterion)
|
static Assignments |
cluster(Matrix matrix,
int numClusters,
int numRepetitions,
KMeansSeed seedType,
CriterionFunction criterion)
|
Assignments |
cluster(Matrix matrix,
int numClusters,
Properties properties)
Clusters the set of rows in the given
Matrix into the specified
number of clusters. |
Assignments |
cluster(Matrix matrix,
Properties properties)
Throws
UnsupportedOperationException . |
String |
toString() |
public static final String PROPERTY_PREFIX
DirectClustering
.public static final String CRITERIA_PROPERTY
CriterionFunction
to use when
clustering the data.public static final String REPEAT_PROPERTY
DirectClustering
will be run. If this is more than 1, the best scoring
run will be returned.public static final String SEED_PROPERTY
KMeansSeed
algorithm to use.public Assignments cluster(Matrix matrix, Properties properties)
UnsupportedOperationException
.cluster
in interface Clustering
matrix
- the Matrix
whose row data points are to be
clusteredproperties
- the properties to use for any parameters each clustering
algorithm may needAssignment
instances that indicate zero or
more clusters to which each row belongs.public Assignments cluster(Matrix matrix, int numClusters, Properties properties)
Matrix
into the specified
number of clusters. The set of cluster assignments are returned for each
row in the matrix.cluster
in interface Clustering
matrix
- the Matrix
whose row data points are to be
clusterednumClusters
- the number of clusters to generateproperties
- the properties to use for any parameters each clustering
algorithm may needAssignment
instances that indicate zero or
more clusters to which each row belongs.public static Assignments cluster(Matrix matrix, int numClusters, int numRepetitions)
matrix
using the RandomSeed
seeding algorithm
and the default kmeans CriterionFunction
. The best scoring
solution out of numRepetitions
will be returned.public static Assignments cluster(Matrix matrix, int numClusters, int numRepetitions, CriterionFunction criterion)
matrix
using the RandomSeed
seeding algorithm and the specified CriterionFunction
. The best
scoring solution out of numRepetitions
will be returned.public static Assignments cluster(Matrix matrix, int numClusters, int numRepetitions, KMeansSeed seedType, CriterionFunction criterion)
matrix
using the specified SeedAlgorithm
and the specified CriterionFunction
. The best scoring solution
out of numRepetitions
will be returned.Copyright © 2012. All Rights Reserved.