You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/02/21 10:16:01 UTC

[GitHub] [spark] zero323 commented on pull request #35554: [SPARK-38239][PYTHON][MLLIB] Fix pyspark.mllib.LogisticRegressionModel.__repr__

zero323 commented on pull request #35554:
URL: https://github.com/apache/spark/pull/35554#issuecomment-1046701633


   @HyukjinKwon  There is simply no such method define. `_call_java` is part of the `pyspark.ml.wrapper.JavaWrapper` API, which is not used in `pyspark.mllib`. Also, JVM model is not captured in this (and most of the `pyspark.mllib` if I recall correctly), so there is no object on which such method could be invoked ‒ if there was, we'd use something like tree models:
   
   https://github.com/apache/spark/blob/3a750ca4686e85e715c48c688f48acf7851144ed/python/pyspark/mllib/tree.py#L76-L78
   
   In general, `mllib` models don't have consistent string representation ‒ some just use `object` implementation, some summary like this one, some show [coefficients](https://github.com/apache/spark/blob/3a750ca4686e85e715c48c688f48acf7851144ed/python/pyspark/mllib/regression.py#L110-L111), and every time we use `__repr__` instead of `__str__`. If API wasn't in maintenance mode, that be something to address I guess...


-- 
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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org