Github user holdenk commented on a diff in the pull request:
https://github.com/apache/spark/pull/20701#discussion_r175235769
--- Diff:
mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeansModel.scala ---
@@ -46,6 +47,10 @@ class KMeansModel @Since("2.4.0") (@Since("1.0.0") val
clusterCenters: Array[Vec
private val clusterCentersWithNorm =
if (clusterCenters == null) null else clusterCenters.map(new
VectorWithNorm(_))
+ @Since("2.4.0")
+ def this(clusterCenters: Array[Vector], distanceMeasure: String) =
+ this(clusterCenters: Array[Vector], distanceMeasure, -1)
--- End diff --
Sounds reasonable, I personally don't enjoy -1 to indicate lack of
information but it seems to be what we have generally used in the past for
mllib summary info into ml so my personal feelings aren't important :)
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]