public class KernelBasedKMeansEngine extends Object implements ClusteringAlgorithm
Constructor and Description |
---|
KernelBasedKMeansEngine() |
KernelBasedKMeansEngine(Kernel kernel,
int k,
int maxIterations) |
Modifier and Type | Method and Description |
---|---|
float |
calculateDistance(Example example,
Cluster cluster)
Estimate the distance of an example from the centroid
|
void |
checkConsistency(int K,
int inputSize) |
List<Cluster> |
cluster(Dataset dataset)
It starts the clustering process exploiting the provided
dataset |
float |
evaluateKernel(Example e1,
Example e2) |
int |
getK() |
Kernel |
getKernel() |
int |
getMaxIterations() |
void |
setK(int k) |
void |
setKernel(Kernel kernel) |
void |
setMaxIterations(int maxIterations) |
public KernelBasedKMeansEngine()
public KernelBasedKMeansEngine(Kernel kernel, int k, int maxIterations)
kernel
- The kernel functionk
- The number of expected clustersmaxIterations
- The maximum number of iterationspublic float calculateDistance(Example example, Cluster cluster)
example
- An examplecluster
- A clusterpublic void checkConsistency(int K, int inputSize) throws Exception
Exception
public List<Cluster> cluster(Dataset dataset)
ClusteringAlgorithm
dataset
cluster
in interface ClusteringAlgorithm
public int getK()
public Kernel getKernel()
public int getMaxIterations()
public void setK(int k)
public void setKernel(Kernel kernel)
public void setMaxIterations(int maxIterations)
Copyright © 2015 Semantic Analytics Group @ Uniroma2. All rights reserved.