You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by bravo-zhang <gi...@git.apache.org> on 2017/08/10 00:33:17 UTC
[GitHub] spark pull request #18898: [SPARK-21245][ML] Resolve code duplication for cl...
GitHub user bravo-zhang opened a pull request:
https://github.com/apache/spark/pull/18898
[SPARK-21245][ML] Resolve code duplication for classification/regression summarizers
## Why the change?
In several places (LogReg, LinReg, SVC) in Spark ML, we collect summary information about training data using `MultivariateOnlineSummarizer` and `MulticlassSummarizer`. We have the same code appearing in several places (including test suites). We can eliminate this by creating a common implementation.
## What changes were proposed in this pull request?
1. A new class `ml.stat.Summarizers.scala` with `def getRegressionSummarizers` and `def getClassificationSummarizers` that provides a pair of feature and label summarizers.
This centralizes the duplicated code in: `LinearRegression`, `LinearSVC`, `LogisticRegression` and `DifferentiableLossAggregatorSuite`.
2. Moves `MultiClassSummarizer.scala`(and testSuite) out of `LogisticRegression.scala` to new file `ml.stat.MultiClassSummarizer.scala`, because it is also used by `LinearSVC` and can be generalized.
## How was this patch tested?
`ml.stat.SummarizersSuite.scala`
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/bravo-zhang/spark spark-21245
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/18898.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 #18898
----
commit 1f5209f7e40c520e1c6b6b5943ef87fde7d5b254
Author: bravo-zhang <mz...@gmail.com>
Date: 2017-08-09T16:05:23Z
Resolve code duplication for classification/regression summarizers
----
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #18898: [SPARK-21245][ML] Resolve code duplication for classific...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/18898
Can one of the admins verify this patch?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #18898: [SPARK-21245][ML] Resolve code duplication for classific...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/18898
Can one of the admins verify this patch?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #18898: [SPARK-21245][ML] Resolve code duplication for classific...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/18898
Can one of the admins verify this patch?
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #18898: [SPARK-21245][ML] Resolve code duplication for classific...
Posted by bravo-zhang <gi...@git.apache.org>.
Github user bravo-zhang commented on the issue:
https://github.com/apache/spark/pull/18898
Hi @sethah and @yanboliang , can someone take a look? Thanks.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #18898: [SPARK-21245][ML] Resolve code duplication for classific...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/18898
Can one of the admins verify this patch?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #18898: [SPARK-21245][ML] Resolve code duplication for classific...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/18898
Can one of the admins verify this patch?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org