GitHub user sethah opened a pull request:
https://github.com/apache/spark/pull/19680
[SPARK-22641][ML] Refactor Spark ML model summaries
## What changes were proposed in this pull request?
JIRA: [SPARK-22641](https://issues.apache.org/jira/browse/SPARK-22461)
This patch moves `LinearRegression[Training]Summary`,
`LogisticRegression[Training]Summary`
`[KMeans|GaussianMixture|BisectingKMeans]Summary` into a new
`org.apache.spark.ml.summary` module.
Additionally, a new summary hierarchy is created, that all current and
future summaries can inherit from.
```scala
trait PredictionSummary
trait SupervisedPredictionSummary extends PredictionSummary
trait RegressionSummary extends SupervisedPredictionSummary
trait ClassificationSummary extends SupervisedPredictionSummary
trait BinaryClassificationSummary extends ClassificationSummary
trait ProbabilisticClassificationSummary extends ClassificationSummary
trait BinaryProbabilisticClassificationSummary extends
BinaryClassificationSummary with ProbabilisticClassificationSummary
trait ClusteringSummary extends PredictionSummary
```
This patch is part of an effort to clean up some of the existing code and
will also help make it easier to add model summaries to other models since they
can simply extend this API. The exact names/structure of the traits are
certainly open for discussion.
## How was this patch tested?
No intended change to the functionality, so existing unit tests should be
sufficient.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/sethah/spark move_summaries
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/19680.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #19680
----
commit df99b1c104462f55b718e0b579415a1141048a12
Author: sethah <[email protected]>
Date: 2017-11-06T17:57:53Z
initial commit for summaries refactor
commit 152cce0a29018e5933347698e0d1bf01d88b4373
Author: sethah <[email protected]>
Date: 2017-11-06T20:54:39Z
imports and scopes
commit 44821e49bd7926d2d62a45679448c807fd18e8fb
Author: sethah <[email protected]>
Date: 2017-11-06T21:32:58Z
more imports
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]