Skip to content

Commit

Permalink
fix python style
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengruifeng committed Mar 11, 2016
1 parent d441511 commit 165a4fe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions examples/src/main/python/ml/bisecting_k_means_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@

# $example on$
data = sc.textFile("data/mllib/kmeans_data.txt")
parsedData = data.map(lambda line: Row(features=Vectors.dense(
[float(x) for x in line.split(' ')])))
training = sqlContext.createDataFrame(parsedData)
parsed = data.map(lambda l: Row(features=Vectors.dense([float(x) for x in l.split(' ')])))
training = sqlContext.createDataFrame(parsed)

kmeans = BisectingKMeans().setK(2).setSeed(1).setFeaturesCol("features")

Expand Down

0 comments on commit 165a4fe

Please sign in to comment.