Repository: spark
Updated Branches:
  refs/heads/master fdd3bace1 -> 6b425874d


[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 #22873 from mgaido91/SPARK-25866.

Authored-by: Marco Gaido <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/6b425874
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/6b425874
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/6b425874

Branch: refs/heads/master
Commit: 6b425874d311146d8fbf7685c1b5d8e97d73b101
Parents: fdd3bac
Author: Marco Gaido <[email protected]>
Authored: Tue Nov 6 23:18:55 2018 +0800
Committer: Wenchen Fan <[email protected]>
Committed: Tue Nov 6 23:18:55 2018 +0800

----------------------------------------------------------------------
 .../main/scala/org/apache/spark/mllib/clustering/KMeansModel.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/6b425874/mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeansModel.scala
----------------------------------------------------------------------
diff --git 
a/mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeansModel.scala 
b/mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeansModel.scala
index d5c8188..b070954 100644
--- a/mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeansModel.scala
+++ b/mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeansModel.scala
@@ -113,7 +113,7 @@ class KMeansModel (@Since("1.0.0") val clusterCenters: 
Array[Vector],
     KMeansModel.SaveLoadV2_0.save(sc, this, path)
   }
 
-  override protected def formatVersion: String = "1.0"
+  override protected def formatVersion: String = "2.0"
 }
 
 @Since("1.4.0")


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to