Github user hhbyyh commented on a diff in the pull request: https://github.com/apache/spark/pull/17586#discussion_r111313220 --- Diff: python/pyspark/ml/classification.py --- @@ -172,6 +172,59 @@ def intercept(self): """ return self._call_java("intercept") + @property + @since("2.2.0") + def hasSummary(self): + """ + Indicates whether a training summary exists for this model + instance. + """ + return self._call_java("hasSummary") + + @property + @since("2.2.0") + def summary(self): + """ + Gets summary (e.g. objective history, total iterations) of model + trained on the training set. + """ + if self.hasSummary: + java_blrt_summary = self._call_java("summary") + return LinearSVCTrainingSummary(java_blrt_summary) + else: + raise RuntimeError("No training summary available for this %s" % + self.__class__.__name__) + + +@inherit_doc +class LinearSVCTrainingSummary(JavaWrapper): + """ + .. note:: Experimental + + Abstraction for LinearSVC Training results. --- End diff -- remove the abstraction here.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org