Skip to content

Commit d6c713f

Browse files
mgaido91cloud-fan
authored andcommitted
[SPARK-25866][ML] Update KMeans formatVersion
## What changes were proposed in this pull request? When we added the `distanceMeasure`, we didn't update the `formatVersion` for `KMeans`. Despite this is not a big issue, as that information is used nowhere, we are returning a wrong information. ## How was this patch tested? NA Closes apache#22873 from mgaido91/SPARK-25866. Authored-by: Marco Gaido <[email protected]> Signed-off-by: Wenchen Fan <[email protected]> (cherry picked from commit 6b42587) Signed-off-by: Wenchen Fan <[email protected]>
1 parent 52e9711 commit d6c713f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class KMeansModel (@Since("1.0.0") val clusterCenters: Array[Vector],
113113
KMeansModel.SaveLoadV2_0.save(sc, this, path)
114114
}
115115

116-
override protected def formatVersion: String = "1.0"
116+
override protected def formatVersion: String = "2.0"
117117
}
118118

119119
@Since("1.4.0")

0 commit comments

Comments
 (0)