Collaboration diagram for Clusterer< T extends Clusterable< T > >:Clustering algorithm based on David Arthur and Sergei Vassilvitski k-means++ algorithm.
| <T> | type of the points to cluster |
Public Methods | |
| Clusterer (final Random random, KMeansClustererComponent component) | |
| List< Cluster< T > > | cluster (final List< T > points, final int k, final int maxIterations) throws InterruptedException, ExecutionException |
Package Functions | |
| private< T extends Clusterable < T > > void | assignPointsToClusters (final Collection< Cluster< T >> clusters, final List< T > points) throws InterruptedException, ExecutionException |
| private< T extends Clusterable < T > > List< Cluster< T > > | chooseInitialCenters (final Collection< T > points, final int k, final Random random) |
| private< T extends Clusterable < T > > Cluster< T > | getNearestCluster (final Collection< Cluster< T >> clusters, final T point) |
| Clusterer | ( | final Random | random, |
| KMeansClustererComponent | component | ||
| ) |
Build a clusterer.
| random | random generator to use for choosing initial centers |
| kMeansClusterer |
| private<T extends Clusterable<T> > void assignPointsToClusters | ( | final Collection< Cluster< T >> | clusters, |
| final List< T > | points | ||
| ) | throws InterruptedException, ExecutionException [package] |
| private<T extends Clusterable<T> > List<Cluster<T> > chooseInitialCenters | ( | final Collection< T > | points, |
| final int | k, | ||
| final Random | random | ||
| ) | [package] |
Use K-means++ to choose the initial centers.
| <T> | type of the points to cluster |
| points | the points to choose the initial centers from |
| k | the number of centers to choose |
| random | random generator to use |
| ExecutionException | |
| InterruptedException |
| List<Cluster<T> > cluster | ( | final List< T > | points, |
| final int | k, | ||
| final int | maxIterations | ||
| ) | throws InterruptedException, ExecutionException |
Runs the K-means++ clustering algorithm.
| points | the points to cluster |
| k | the number of clusters to split the data into |
| maxIterations | the maximum number of iterations to run the algorithm for. If negative, no maximum will be used |
| ExecutionException | |
| InterruptedException |
| private<T extends Clusterable<T> > Cluster<T> getNearestCluster | ( | final Collection< Cluster< T >> | clusters, |
| final T | point | ||
| ) | [package] |