lindong28 commented on a change in pull request #28:
URL: https://github.com/apache/flink-ml/pull/28#discussion_r757255599



##########
File path: 
flink-ml-lib/src/main/java/org/apache/flink/ml/clustering/kmeans/KMeans.java
##########
@@ -146,7 +145,7 @@ public IterationBodyResult process(
             DataStream<DenseVector> points = dataStreams.get(0);
 
             DataStream<Integer> terminationCriteria =
-                    centroids.flatMap(new 
TerminateOnMaxIterationNum<>(maxIterationNum));
+                    centroids.map(x -> 0.).flatMap(new 
TerminationCriteria(maxIterationNum));

Review comment:
       How about we have `TerminateOnMaxIter` and `TerminateOnMaxIterOrTol`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to