jsat.clustering.kmeans
Class ElkanKernelKMeans
- java.lang.Object
-
- jsat.clustering.ClustererBase
-
- jsat.clustering.KClustererBase
-
- jsat.clustering.kmeans.KernelKMeans
-
- jsat.clustering.kmeans.ElkanKernelKMeans
-
- All Implemented Interfaces:
- java.io.Serializable, Clusterer, KClusterer, Parameterized
public class ElkanKernelKMeans extends KernelKMeans
An efficient implementation of the K-Means algorithm. This implementation uses the triangle inequality to accelerate computation while maintaining the exact same solution. This requires that theDistanceMetricused supportDistanceMetric.isSubadditive().
See: Elkan, C. (2003). Using the Triangle Inequality to Accelerate k-Means. In Proceedings of the Twentieth International Conference on Machine Learning (ICML-2003) (pp. 147–153). AAAI Press.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description ElkanKernelKMeans(ElkanKernelKMeans toCopy)ElkanKernelKMeans(KernelTrick kernel)Creates a new Kernel K Means object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description ElkanKernelKMeansclone()int[]cluster(DataSet dataSet, int clusters, boolean parallel, int[] designations)intfindClosestCluster(Vec x, java.util.List<java.lang.Double> qi)Finds the cluster ID that is closest to the given data point-
Methods inherited from class jsat.clustering.kmeans.KernelKMeans
cluster, cluster, cluster, cluster, distance, distance, findClosestCluster, getMaximumIterations, meanToMeanDistance, setMaximumIterations, supportsWeightedData
-
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.parameters.Parameterized
getParameter, getParameters
-
-
-
-
Constructor Detail
-
ElkanKernelKMeans
public ElkanKernelKMeans(KernelTrick kernel)
Creates a new Kernel K Means object- Parameters:
kernel- the kernel to use
-
ElkanKernelKMeans
public ElkanKernelKMeans(ElkanKernelKMeans toCopy)
-
-
Method Detail
-
findClosestCluster
public int findClosestCluster(Vec x, java.util.List<java.lang.Double> qi)
Description copied from class:KernelKMeansFinds the cluster ID that is closest to the given data point- Overrides:
findClosestClusterin classKernelKMeans- Parameters:
x- the data point to get the closest cluster forqi- the query information for the given data point generated for the kernel in use. SeeKernelTrick.getQueryInfo(jsat.linear.Vec)- Returns:
- the index of the closest cluster
-
cluster
public int[] cluster(DataSet dataSet, int clusters, boolean parallel, int[] designations)
-
clone
public ElkanKernelKMeans clone()
- Specified by:
clonein interfaceClusterer- Specified by:
clonein interfaceKClusterer- Specified by:
clonein classKernelKMeans
-
-
DataMelt 3.0 © DataMelt by jWork.ORG