dongjoon-hyun commented on a change in pull request #26439: [SPARK-29801][ML] 
ML models unify toString method
URL: https://github.com/apache/spark/pull/26439#discussion_r344539137
 
 

 ##########
 File path: 
mllib/src/main/scala/org/apache/spark/ml/clustering/BisectingKMeans.scala
 ##########
 @@ -91,6 +91,9 @@ class BisectingKMeansModel private[ml] (
   extends Model[BisectingKMeansModel] with BisectingKMeansParams with 
MLWritable
   with HasTrainingSummary[BisectingKMeansSummary] {
 
+  @Since("3.0.0")
+  val numFeatures: Int = parentModel.clusterCenters.head.size
 
 Review comment:
   This seems to be beyond the scope of this PR, but it looks okay. Maybe, 
`lazy val` is better?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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]

Reply via email to