You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by WeichenXu123 <gi...@git.apache.org> on 2016/07/20 02:20:37 UTC

[GitHub] spark pull request #14276: [SPARK-16638][ML][Optimizer] fix L2 reg computati...

GitHub user WeichenXu123 opened a pull request:

    https://github.com/apache/spark/pull/14276

    [SPARK-16638][ML][Optimizer] fix L2 reg computation in linearRegression when standarlization is false

    ## What changes were proposed in this pull request?
    
    when `standardization == false`
    update L2 reg computation
    from
    `0.5 * effectiveL2regParam * sigma( ( wi / featuresStd(i) )^2 )`
    to
    `0.5 * effectiveL2regParam * sigma( ( wi * featuresStd(i) )^2 )`
    
    ## How was this patch tested?
    
    Existing test.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/WeichenXu123/spark fix_L2_reg_in_linearRegression

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/14276.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 #14276
    
----
commit 9d4f7a8cf20bcd1f6ede46097406f235f3581b3b
Author: WeichenXu <we...@outlook.com>
Date:   2016-07-14T05:09:12Z

     fix L2 reg in linearRegression when standarlization is false

----


---
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 #14276: [SPARK-16638][ML][Optimizer] fix L2 reg computation in l...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/14276
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/62571/
    Test FAILed.


---
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 #14276: [WIP][SPARK-16638][ML][Optimizer] fix L2 reg computation...

Posted by WeichenXu123 <gi...@git.apache.org>.
Github user WeichenXu123 commented on the issue:

    https://github.com/apache/spark/pull/14276
  
    @srowen
    I re-think the code again and maybe my previous idea is wrong. The intension of author may be to use w[i] / featuresStd[i] to reduce penalty on large scale dimension (because these dimension's w[i] is dominant to training result) so that it can speed up the training. 
    So I close this PR and I need more thinking. Thanks for review!


---
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 #14276: [SPARK-16638][ML][Optimizer] fix L2 reg computation in l...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/14276
  
    **[Test build #62571 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62571/consoleFull)** for PR 14276 at commit [`9d4f7a8`](https://github.com/apache/spark/commit/9d4f7a8cf20bcd1f6ede46097406f235f3581b3b).


---
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 pull request #14276: [WIP][SPARK-16638][ML][Optimizer] fix L2 reg comp...

Posted by WeichenXu123 <gi...@git.apache.org>.
Github user WeichenXu123 closed the pull request at:

    https://github.com/apache/spark/pull/14276


---
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 #14276: [SPARK-16638][ML][Optimizer] fix L2 reg computation in l...

Posted by WeichenXu123 <gi...@git.apache.org>.
Github user WeichenXu123 commented on the issue:

    https://github.com/apache/spark/pull/14276
  
    cc @srowen 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 #14276: [SPARK-16638][ML][Optimizer] fix L2 reg computation in l...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/14276
  
    **[Test build #62571 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62571/consoleFull)** for PR 14276 at commit [`9d4f7a8`](https://github.com/apache/spark/commit/9d4f7a8cf20bcd1f6ede46097406f235f3581b3b).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 #14276: [WIP][SPARK-16638][ML][Optimizer] fix L2 reg computation...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on the issue:

    https://github.com/apache/spark/pull/14276
  
    It's worth double-checking with @holdenk and @dbtsai. I think this is working as intended since `WeightedLeastSquares` does show multiplying each feature by sigma. To undo it you'd need to divide the partial gradient by its square, and divide the squared coefficient value by its square too in the loss term.
    
    I suppose the logic is that features on a larger scale end up with small coefficients and aren't penalized much in the loss function, so multiplying them by their "scale" compensates. I think this only makes sense when fitting an intercept too, but I haven't thought this through.


---
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 #14276: [SPARK-16638][ML][Optimizer] fix L2 reg computation in l...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/14276
  
    Merged build finished. Test FAILed.


---
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