public class ElkanKernelKMeans extends KernelKMeans
DistanceMetric
used support
DistanceMetric.isSubadditive()
. accel, kernel, maximumIterations, meanSqrdNorms, newDesignations, normConsts, ownes, selfK, W, X
Constructor and Description |
---|
ElkanKernelKMeans(ElkanKernelKMeans toCopy) |
ElkanKernelKMeans(KernelTrick kernel)
Creates a new Kernel K Means object
|
Modifier and Type | Method and Description |
---|---|
ElkanKernelKMeans |
clone() |
int[] |
cluster(DataSet dataSet,
int clusters,
ExecutorService threadpool,
int[] designations) |
int[] |
cluster(DataSet dataSet,
int clusters,
int[] designations) |
protected double |
cluster(DataSet dataSet,
int k,
int[] assignment,
boolean exactTotal,
ExecutorService threadpool)
This is a helper method where the actual cluster is performed.
|
int |
findClosestCluster(Vec x,
List<Double> qi)
Finds the cluster ID that is closest to the given data point
|
applyMeanUpdates, cluster, cluster, cluster, cluster, distance, distance, distance, evalSumK, evalSumK, findClosestCluster, getMaximumIterations, getParameter, getParameters, meanToMeanDistance, meanToMeanDistance, meanToMeanDistance, meanToMeanDistance, meanToMeanDistance, setMaximumIterations, setup, supportsWeightedData, updateMeansFromChange, updateMeansFromChange, updateNormConsts
cluster, cluster, cluster, cluster
cluster, cluster, createClusterListFromAssignmentArray, getDatapointsFromCluster
public ElkanKernelKMeans(KernelTrick kernel)
kernel
- the kernel to usepublic ElkanKernelKMeans(ElkanKernelKMeans toCopy)
public int findClosestCluster(Vec x, List<Double> qi)
KernelKMeans
findClosestCluster
in class KernelKMeans
x
- the data point to get the closest cluster forqi
- the query information for the given data point generated for the kernel in use. See KernelTrick.getQueryInfo(jsat.linear.Vec)
protected double cluster(DataSet dataSet, int k, int[] assignment, boolean exactTotal, ExecutorService threadpool)
dataSet
- The set of data points to perform clustering onk
- the number of clustersassignment
- an empty temp space to store the clustering
classifications. Should be the same length as the number of data pointsexactTotal
- determines how the objective function (return value)
will be computed. If true, extra work will be done to compute the exact
distance from each data point to its cluster. If false, an upper bound
approximation will be used.threadpool
- the source of threads for parallel computation. If null, single threaded execution will occurpublic int[] cluster(DataSet dataSet, int clusters, ExecutorService threadpool, int[] designations)
public int[] cluster(DataSet dataSet, int clusters, int[] designations)
public ElkanKernelKMeans clone()
clone
in interface Clusterer
clone
in interface KClusterer
clone
in class KernelKMeans
Copyright © 2017. All rights reserved.