public class LinearKMeansEngine extends Object implements ClusteringAlgorithm
it.uniroma2.sag.kelp.learningalgorithm.clustering.kernelbasedkmeans.KernelBasedKMeansEngine
as, at each iteration, it explicitly computes the centroid of each cluster.
The computational cost is thus O(Ikn), where: it.uniroma2.sag.kelp.learningalgorithm.clustering.kernelbasedkmeans.KernelBasedKMeansEngine
is O(n^2).
For more details on the K-mean Algorithm, please refer to:
https://en.wikipedia.org/wiki/K-means_clustering
Constructor and Description |
---|
LinearKMeansEngine() |
LinearKMeansEngine(String representationName,
int k,
int maxIterations) |
Modifier and Type | Method and Description |
---|---|
ClusterList |
cluster(Dataset dataset)
It starts the clustering process exploiting the provided
dataset |
ClusterList |
cluster(Dataset dataset,
ExampleSelector seedSelector)
It starts the clustering process exploiting the provided
dataset |
int |
getK() |
int |
getMaxIterations() |
String |
getRepresentationName() |
void |
setK(int k) |
void |
setMaxIterations(int maxIterations) |
void |
setRepresentationName(String representationName) |
public LinearKMeansEngine()
public LinearKMeansEngine(String representationName, int k, int maxIterations)
representationName
- The representation name containing the vector used by the
algorithmk
- The number of expected clustersmaxIterations
- The maximum number of iterationspublic ClusterList cluster(Dataset dataset)
ClusteringAlgorithm
dataset
cluster
in interface ClusteringAlgorithm
public ClusterList cluster(Dataset dataset, ExampleSelector seedSelector)
ClusteringAlgorithm
dataset
cluster
in interface ClusteringAlgorithm
seedSelector
- the seed selectorpublic int getK()
public int getMaxIterations()
public String getRepresentationName()
public void setK(int k)
public void setMaxIterations(int maxIterations)
public void setRepresentationName(String representationName)
Copyright © 2018 Semantic Analytics Group @ Uniroma2. All rights reserved.