WeichenXu123 commented on code in PR #50106: URL: https://github.com/apache/spark/pull/50106#discussion_r1983079160
########## 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: idea: can we just use `SizeEstimator` to estimate the model object size ? -- 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