Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
style correction
  • Loading branch information
FlytxtRnD committed Jul 14, 2015
commit ef95ee28466be9870eba5ea6cf1afcca8b7345a5
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,13 @@ class KMeans private (
val initStartTime = System.nanoTime()

// Only one run is allowed when initialModel is given
val numRuns = if (initialModel.nonEmpty){
if (runs >1 ) logWarning("Ignoring runs; one run is allowed when initialModel is given.")
val numRuns = if (initialModel.nonEmpty) {
if (runs > 1) logWarning("Ignoring runs; one run is allowed when initialModel is given.")
1
} else runs


} else {
runs
}

val centers = initialModel match {
case Some(kMeansCenters) => {
Array(kMeansCenters.clusterCenters.map(s => new VectorWithNorm(s)))
Expand Down