Github user MLnick commented on a diff in the pull request:
https://github.com/apache/spark/pull/12925#discussion_r62739863
--- Diff: examples/src/main/python/ml/kmeans_example.py ---
@@ -17,55 +17,43 @@
from __future__ import print_function
-import sys
-
-import numpy as np
+# $example on$
from pyspark.ml.clustering import KMeans, KMeansModel
-from pyspark.mllib.linalg import VectorUDT, _convert_to_vector
+# $example off$
+
from pyspark.sql import SparkSession
-from pyspark.sql.types import Row, StructField, StructType
"""
A simple example demonstrating a k-means clustering.
--- End diff --
while we're at it, drop the "simple" to match Scala/Java examples
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]