Skip to content

Commit ef95ee2

Browse files
committed
style correction
1 parent c446c58 commit ef95ee2

File tree

1 file changed

+6
-5
lines changed
  • mllib/src/main/scala/org/apache/spark/mllib/clustering

1 file changed

+6
-5
lines changed

mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeans.scala

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,13 @@ class KMeans private (
209209
val initStartTime = System.nanoTime()
210210

211211
// Only one run is allowed when initialModel is given
212-
val numRuns = if (initialModel.nonEmpty){
213-
if (runs >1 ) logWarning("Ignoring runs; one run is allowed when initialModel is given.")
212+
val numRuns = if (initialModel.nonEmpty) {
213+
if (runs > 1) logWarning("Ignoring runs; one run is allowed when initialModel is given.")
214214
1
215-
} else runs
216-
217-
215+
} else {
216+
runs
217+
}
218+
218219
val centers = initialModel match {
219220
case Some(kMeansCenters) => {
220221
Array(kMeansCenters.clusterCenters.map(s => new VectorWithNorm(s)))

0 commit comments

Comments
 (0)