jsat.clustering.hierarchical
Class DivisiveLocalClusterer
- java.lang.Object
-
- jsat.clustering.ClustererBase
-
- jsat.clustering.KClustererBase
-
- jsat.clustering.hierarchical.DivisiveLocalClusterer
-
- All Implemented Interfaces:
- java.io.Serializable, Clusterer, KClusterer
public class DivisiveLocalClusterer extends KClustererBase
DivisiveLocalClusterer is a hierarchical clustering method that works by splitting the data set into sub trees from the top down. Unlike many top-up methods, such asSimpleHAC, top-down methods require another clustering method to perform the splitting at each iteration. If the base method is not deterministic, then the top-down method will not be deterministic.
Specifically, DivisiveLocalClusterer greedily chooses the cluster to split based on an evaluation of only the cluster being split. Because of this local search of the world, DivisiveLocalClusterer has poor performance in determining the number of clusters in the data set. As such, only the methods where the exact number of clusters are recommended.
This greedy strategy can also lead to drilling down clusters into small parts, and works best when only a small number of clusters are needed.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description DivisiveLocalClusterer(DivisiveLocalClusterer toCopy)Copy constructorDivisiveLocalClusterer(KClusterer baseClusterer, ClusterEvaluation clusterEvaluation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description DivisiveLocalClustererclone()int[]cluster(DataSet dataSet, boolean parallel, 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, boolean parallel, int[] designations)int[]cluster(DataSet dataSet, int lowK, int highK, boolean parallel, int[] designations)-
Methods inherited from class jsat.clustering.ClustererBase
createClusterListFromAssignmentArray, getDatapointsFromCluster
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jsat.clustering.KClusterer
cluster, cluster, cluster, cluster, cluster, cluster
-
Methods inherited from interface jsat.clustering.Clusterer
cluster, cluster, supportsWeightedData
-
-
-
-
Constructor Detail
-
DivisiveLocalClusterer
public DivisiveLocalClusterer(KClusterer baseClusterer, ClusterEvaluation clusterEvaluation)
-
DivisiveLocalClusterer
public DivisiveLocalClusterer(DivisiveLocalClusterer toCopy)
Copy constructor- Parameters:
toCopy- the object to copy
-
-
Method Detail
-
cluster
public int[] cluster(DataSet dataSet, int[] designations)
Description copied from interface:ClustererPerforms clustering on the given data set. Parameters may be estimated by the method, or other heuristics performed.- Parameters:
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.- Returns:
- an array indicating for each value indicating the cluster designation. This is the same array as designations, or a new one if the input array was null
-
cluster
public int[] cluster(DataSet dataSet, boolean parallel, int[] designations)
Description copied from interface:ClustererPerforms clustering on the given data set. Parameters may be estimated by the method, or other heuristics performed.- Parameters:
dataSet- the data set to perform clustering onparallel-trueif multiple threads should be used to perform clustering.falseif it should be done in a single threaded manner.designations- 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.- Returns:
- the int[]
-
cluster
public int[] cluster(DataSet dataSet, int clusters, boolean parallel, int[] designations)
-
cluster
public int[] cluster(DataSet dataSet, int lowK, int highK, boolean parallel, int[] designations)
-
clone
public DivisiveLocalClusterer clone()
- Specified by:
clonein interfaceClusterer- Specified by:
clonein interfaceKClusterer- Specified by:
clonein classKClustererBase
-
-
DataMelt 3.0 © DataMelt by jWork.ORG