aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorZheng RuiFeng <ruifengz@foxmail.com>2016-02-29 22:24:43 -0800
committerXiangrui Meng <meng@databricks.com>2016-02-29 22:24:43 -0800
commit0a4b620f3144d68232eb7914ae05563aab648ced (patch)
tree1825f52c1ad52141a09a08cb768dadcf1f14b37f /examples
parentc7fccb56cd9260b8d72572e65f8e46a14707b9a5 (diff)
downloadspark-0a4b620f3144d68232eb7914ae05563aab648ced.tar.gz
spark-0a4b620f3144d68232eb7914ae05563aab648ced.tar.bz2
spark-0a4b620f3144d68232eb7914ae05563aab648ced.zip
[SPARK-13551][MLLIB] Fix wrong comment and remove meanless lines in mllib.JavaBisectingKMeansExample
JIRA: https://issues.apache.org/jira/browse/SPARK-13551 ## What changes were proposed in this pull request? Fix wrong comment and remove meanless lines in mllib.JavaBisectingKMeansExample ## How was this patch tested? manual test Author: Zheng RuiFeng <ruifengz@foxmail.com> Closes #11429 from zhengruifeng/mllib_bkm_je.
Diffstat (limited to 'examples')
-rw-r--r--examples/src/main/java/org/apache/spark/examples/mllib/JavaBisectingKMeansExample.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/src/main/java/org/apache/spark/examples/mllib/JavaBisectingKMeansExample.java b/examples/src/main/java/org/apache/spark/examples/mllib/JavaBisectingKMeansExample.java
index 0001500f4f..c600094947 100644
--- a/examples/src/main/java/org/apache/spark/examples/mllib/JavaBisectingKMeansExample.java
+++ b/examples/src/main/java/org/apache/spark/examples/mllib/JavaBisectingKMeansExample.java
@@ -33,7 +33,7 @@ import org.apache.spark.mllib.linalg.Vectors;
// $example off$
/**
- * Java example for graph clustering using power iteration clustering (PIC).
+ * Java example for bisecting k-means clustering.
*/
public class JavaBisectingKMeansExample {
public static void main(String[] args) {
@@ -54,9 +54,7 @@ public class JavaBisectingKMeansExample {
BisectingKMeansModel model = bkm.run(data);
System.out.println("Compute Cost: " + model.computeCost(data));
- for (Vector center: model.clusterCenters()) {
- System.out.println("");
- }
+
Vector[] clusterCenters = model.clusterCenters();
for (int i = 0; i < clusterCenters.length; i++) {
Vector clusterCenter = clusterCenters[i];