srowen commented on a change in pull request #22764: [SPARK-25765][ML] Add
training cost to BisectingKMeans summary
URL: https://github.com/apache/spark/pull/22764#discussion_r242575971
##########
File path:
mllib/src/main/scala/org/apache/spark/mllib/clustering/BisectingKMeansModel.scala
##########
@@ -41,11 +41,12 @@ import org.apache.spark.sql.{Row, SparkSession}
@Since("1.6.0")
class BisectingKMeansModel private[clustering] (
private[clustering] val root: ClusteringTreeNode,
- @Since("2.4.0") val distanceMeasure: String
+ @Since("2.4.0") val distanceMeasure: String,
+ @Since("3.0.0") val trainingCost: Double
) extends Serializable with Saveable with Logging {
@Since("1.6.0")
- def this(root: ClusteringTreeNode) = this(root, DistanceMeasure.EUCLIDEAN)
+ def this(root: ClusteringTreeNode) = this(root, DistanceMeasure.EUCLIDEAN,
0.0)
Review comment:
On the other hand, we did preserve this old constructor, and that's fine to
keep. The other issue I see here is that the cost is 0, when the cost is really
unknown.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]