-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-18282][ML][PYSPARK] Add python clustering summaries for GMM and BKM #15777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
edc2c44
c3859da
f599175
6f89617
952d24a
428348d
d6caa02
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -309,13 +309,16 @@ def interceptVector(self): | |
| @since("2.0.0") | ||
| def summary(self): | ||
| """ | ||
| Gets summary (e.g. residuals, mse, r-squared ) of model on | ||
| training set. An exception is thrown if | ||
| `trainingSummary is None`. | ||
| Gets summary (e.g. accuracy/precision/recall, objective history, total iterations) of model | ||
| trained on the training set. An exception is thrown if `trainingSummary is None`. | ||
| """ | ||
| java_blrt_summary = self._call_java("summary") | ||
| # Note: Once multiclass is added, update this to return correct summary | ||
| return BinaryLogisticRegressionTrainingSummary(java_blrt_summary) | ||
| if self.hasSummary: | ||
| java_blrt_summary = self._call_java("summary") | ||
| # Note: Once multiclass is added, update this to return correct summary | ||
| return BinaryLogisticRegressionTrainingSummary(java_blrt_summary) | ||
| else: | ||
| raise RuntimeError("No training summary available for this %s" % | ||
|
||
| self.__class__.__name__) | ||
|
|
||
| @property | ||
| @since("2.0.0") | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks better. Could you make the change for Scala LiR, LoR, GLM and KMeans as well? I think they should be consistent. Thanks.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. I also added tests. Thanks for reviewing!