From c251395aaf5a3eb70c3a3d7ea005b4a31cf4dcfc Mon Sep 17 00:00:00 2001 From: Gilles Sadowski Date: Sun, 22 Mar 2020 10:47:02 +0100 Subject: [PATCH] Javadoc (errors and warnings). --- .../commons/math4/ml/clustering/MiniBatchKMeansClusterer.java | 4 +++- .../math4/ml/clustering/evaluation/SumOfClusterVariances.java | 3 +-- .../ml/clustering/initialization/CentroidInitializer.java | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/apache/commons/math4/ml/clustering/MiniBatchKMeansClusterer.java b/src/main/java/org/apache/commons/math4/ml/clustering/MiniBatchKMeansClusterer.java index a6c29472d..06078262b 100644 --- a/src/main/java/org/apache/commons/math4/ml/clustering/MiniBatchKMeansClusterer.java +++ b/src/main/java/org/apache/commons/math4/ml/clustering/MiniBatchKMeansClusterer.java @@ -63,7 +63,7 @@ public class MiniBatchKMeansClusterer extends KMeansPlusP * * @param k the number of clusters to split the data into * @param maxIterations the maximum number of iterations to run the algorithm for all the points, - * for mini batch actual iterations <= maxIterations * points.size() / batchSize + * for mini batch actual {@code iterations <= maxIterations * points.size() / batchSize}. * If negative, no maximum will be used. * @param batchSize the mini batch size for training iterations. * @param initIterations the iterations to find out the best clusters centers with mini batch. @@ -74,6 +74,8 @@ public class MiniBatchKMeansClusterer extends KMeansPlusP * @param measure the distance measure to use, EuclideanDistance is recommended. * @param random random generator to use for choosing initial centers * may appear during algorithm iterations + * @param emptyStrategy Strategy to use for handling empty clusters that + * may appear during algorithm iterations. */ public MiniBatchKMeansClusterer(final int k, final int maxIterations, final int batchSize, final int initIterations, final int initBatchSize, final int maxNoImprovementTimes, diff --git a/src/main/java/org/apache/commons/math4/ml/clustering/evaluation/SumOfClusterVariances.java b/src/main/java/org/apache/commons/math4/ml/clustering/evaluation/SumOfClusterVariances.java index 00ac93c63..46aed3332 100644 --- a/src/main/java/org/apache/commons/math4/ml/clustering/evaluation/SumOfClusterVariances.java +++ b/src/main/java/org/apache/commons/math4/ml/clustering/evaluation/SumOfClusterVariances.java @@ -46,8 +46,7 @@ public class SumOfClusterVariances implements ClusterEvaluator { this.measure = measure; } - /** {@inheritDoc} - * @param clusters*/ + /** {@inheritDoc} */ public double score(List> clusters) { double varianceSum = 0.0; for (final Cluster cluster : clusters) { diff --git a/src/main/java/org/apache/commons/math4/ml/clustering/initialization/CentroidInitializer.java b/src/main/java/org/apache/commons/math4/ml/clustering/initialization/CentroidInitializer.java index dcddc53bc..0378f5516 100644 --- a/src/main/java/org/apache/commons/math4/ml/clustering/initialization/CentroidInitializer.java +++ b/src/main/java/org/apache/commons/math4/ml/clustering/initialization/CentroidInitializer.java @@ -31,6 +31,7 @@ public interface CentroidInitializer { /** * Choose the initial centers. * + * @param Type of points to cluster. * @param points the points to choose the initial centers from * @param k The number of clusters * @return the initial centers