public class PriorityHAC extends KClustererBase
Constructor and Description |
---|
PriorityHAC(PriorityHAC toCopy)
Copy constructor
|
PriorityHAC(UpdatableClusterDissimilarity dissMeasure) |
Modifier and Type | Method and Description |
---|---|
protected static int[] |
assignClusterDesignations(int[] designations,
int clusters,
int[] merges)
Goes through the merge array in order from last merge to first, and sets the cluster assignment for each data point based on the merge list.
|
PriorityHAC |
clone() |
int[] |
cluster(DataSet dataSet,
ExecutorService threadpool,
int[] designations)
Performs clustering on the given data set.
|
int[] |
cluster(DataSet dataSet,
int[] designations)
Performs clustering on the given data set.
|
int[] |
cluster(DataSet dataSet,
int clusters,
ExecutorService threadpool,
int[] designations) |
int[] |
cluster(DataSet dataSet,
int clusters,
int[] designations) |
int[] |
cluster(DataSet dataSet,
int lowK,
int highK,
ExecutorService threadpool,
int[] designations) |
int[] |
cluster(DataSet dataSet,
int lowK,
int highK,
int[] designations) |
List<List<DataPoint>> |
getClusterDesignations(int clusters)
Returns the assignment array for that would have been computed for the
previous data set with the desired number of clusters.
|
int[] |
getClusterDesignations(int[] designations,
int clusters)
Returns the assignment array for that would have been computed for the
previous data set with the desired number of clusters.
|
boolean |
hasStoredClustering()
The PriorityHAC stores its merging order, so that multiple clusterings
can of different sizes can be obtained without having to recluster the
data set.
|
cluster, cluster, cluster, cluster
cluster, cluster, createClusterListFromAssignmentArray, getDatapointsFromCluster, supportsWeightedData
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cluster, cluster, supportsWeightedData
public PriorityHAC(UpdatableClusterDissimilarity dissMeasure)
public PriorityHAC(PriorityHAC toCopy)
toCopy
- the object to copypublic int[] cluster(DataSet dataSet, int[] designations)
Clusterer
dataSet
- the data set to perform clustering ondesignations
- the array which will contain the designated values. The array will be altered and returned by
the function. If null is given, a new array will be created and returned.public int[] cluster(DataSet dataSet, ExecutorService threadpool, int[] designations)
Clusterer
dataSet
- the data set to perform clustering onthreadpool
- a source of threads to run tasksdesignations
- the array which will contain the designated values. The array will be altered and returned by
the function. If null is given, a new array will be created and returned.public int[] cluster(DataSet dataSet, int clusters, ExecutorService threadpool, int[] designations)
public int[] cluster(DataSet dataSet, int clusters, int[] designations)
public int[] cluster(DataSet dataSet, int lowK, int highK, ExecutorService threadpool, int[] designations)
public int[] cluster(DataSet dataSet, int lowK, int highK, int[] designations)
public boolean hasStoredClustering()
public int[] getClusterDesignations(int[] designations, int clusters)
designations
- the array to store the assignments inclusters
- the number of clusters desiredhasStoredClustering()
public List<List<DataPoint>> getClusterDesignations(int clusters)
clusters
- the number of clusters desiredhasStoredClustering()
protected static int[] assignClusterDesignations(int[] designations, int clusters, int[] merges)
designations
- the array to store the designations in, or null to have a new one created automatically.clusters
- the number of clusters to assumemerges
- the array of merge pairspublic PriorityHAC clone()
clone
in interface Clusterer
clone
in interface KClusterer
clone
in class KClustererBase
Copyright © 2017. All rights reserved.