WeichenXu123 commented on code in PR #50106: URL: https://github.com/apache/spark/pull/50106#discussion_r1980993818
########## mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala: ########## @@ -1248,6 +1266,19 @@ class LogisticRegressionModel private[spark] ( } } + private[spark] override def estimatedSize: Long = { + var size = this.estimateMatadataSize + if (this.coefficientMatrix != null) { + size += this.coefficientMatrix.getSizeInBytes + } + if (this.interceptVector != null) { + size += this.interceptVector.getSizeInBytes + } + size += java.lang.Integer.BYTES // numClasses + size += 1 // isMultinomial + size Review Comment: ditto. for model.estimatedSize and estimator.estimateModelSize, they should call a common method to reduce code duplication. -- 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. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org