Skip to content

Commit

Permalink
Modify the indentations
Browse files Browse the repository at this point in the history
  • Loading branch information
yu-iskw committed Jul 1, 2015
1 parent 0ae422f commit 4d2ad1e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ object KMeansSuite {
def generateKMeansData(sql: SQLContext, rows: Int, dim: Int, k: Int): DataFrame = {
val sc = sql.sparkContext
val rdd = sc.parallelize(1 to rows).map(i => Vectors.dense(Array.fill(dim)((i % k).toDouble)))
.map(v => new TestRow(v))
.map(v => new TestRow(v))
sql.createDataFrame(rdd)
}
}
Expand Down Expand Up @@ -105,7 +105,7 @@ class KMeansSuite extends SparkFunSuite with MLlibTestSparkContext {
val transformed = model.transform(dataset)
assert(transformed.columns === Array("features", predictionColName))
val clusters = transformed.select(predictionColName)
.map(row => row.apply(0)).distinct().collect().toSet
.map(row => row.apply(0)).distinct().collect().toSet
assert(clusters.size === k)
assert(clusters === Set(0, 1, 2, 3, 4))
}
Expand Down

0 comments on commit 4d2ad1e

Please sign in to comment.