You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spark.apache.org by dbtsai <gi...@git.apache.org> on 2014/02/28 00:43:34 UTC

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

GitHub user dbtsai opened a pull request:

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

    Initialized the regVal for first iteration in SGD optimizer 

    Ported from https://github.com/apache/incubator-spark/pull/633
    
    In runMiniBatchSGD, the regVal (for 1st iter) should be initialized
    as sum of sqrt of weights if it's L2 update; for L1 update, the same logic is followed.
    
    It maybe not be important here for SGD since the updater doesn't take the loss
    as parameter to find the new weights. But it will give us the correct history of loss.
    However, for LBFGS optimizer we implemented, the correct loss with regVal is crucial to
    find the new weights.


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

    $ git pull https://github.com/AlpineNow/spark dbtsai-smallRegValFix

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

    https://github.com/apache/spark/pull/40.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 #40
    
----
commit 9d2670330ebcde4240d97f0f51d7cfbc71509780
Author: DB Tsai <db...@dbtsai.com>
Date:   2014-02-22T10:59:00Z

    In runMiniBatchSGD, the regVal (for 1st iter) should be initialized
    as sum of sqrt of weights if it's L2 update; for L1 update, the same logic is followed.
    
    It maybe not be important here for SGD since the updater doesn't take the loss
    as parameter to find the new weights. But it will give us the correct history of loss.
    However, for LBFGS optimizer we implemented, the correct loss with regVal is crucial to
    find the new weights.

commit 1c15cfebf8a130744ddea915dd457a8e4291bdfe
Author: DB Tsai <db...@dbtsai.com>
Date:   2014-02-25T22:02:12Z

    Added unittest for the change in runMiniBatchSGD

commit 594a288acd91dd9b426d9327f2b8f4db828321d3
Author: DB Tsai <db...@dbtsai.com>
Date:   2014-02-27T09:37:39Z

    Removed unnecessary parentheses, and fixed a typo.

----


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

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

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

    https://github.com/apache/spark/pull/40#issuecomment-36413559
  
    Merged build started.


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

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

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

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


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

[GitHub] spark issue #40: Initialized the regVal for first iteration in SGD optimizer

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

    https://github.com/apache/spark/pull/40
  
    **[Test build #85 has finished](https://jenkins.test.databricks.com/job/spark-pull-request-builder/85/consoleFull)** for PR 40 at commit [`90460fa`](https://github.com/apache/spark/commit/90460fa5f9958055c36a6dad15f376e987a4f55b).
     * This patch passes all 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 pull request: Initialized the regVal for first iteration in ...

Posted by dbtsai <gi...@git.apache.org>.
Github user dbtsai commented on the pull request:

    https://github.com/apache/spark/pull/40#issuecomment-36413688
  
    It seems that there are still some problems. 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.
---

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

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

    https://github.com/apache/spark/pull/40#issuecomment-36413558
  
     Merged build triggered.


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

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

Posted by dbtsai <gi...@git.apache.org>.
Github user dbtsai commented on the pull request:

    https://github.com/apache/spark/pull/40#issuecomment-36449182
  
    Do I need to close it? 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.
---

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

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

    https://github.com/apache/spark/pull/40#issuecomment-36414271
  
    All automated tests passed.
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/12938/


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

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/40#issuecomment-36413838
  
    It is running now. Let's wait for Jenkins to come back.


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

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/40#issuecomment-36413254
  
    Jenkins, add to whitelist.


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

[GitHub] spark issue #40: Initialized the regVal for first iteration in SGD optimizer

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

    https://github.com/apache/spark/pull/40
  
    **[Test build #85 has started](https://jenkins.test.databricks.com/job/spark-pull-request-builder/85/consoleFull)** for PR 40 at commit [`90460fa`](https://github.com/apache/spark/commit/90460fa5f9958055c36a6dad15f376e987a4f55b).


---
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: Initialized the regVal for first iteration in ...

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

    https://github.com/apache/spark/pull/40#issuecomment-36413274
  
    Merged build started.


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

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/40#issuecomment-36413420
  
    Jenkins, retest this please.


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

[GitHub] spark issue #40: Initialized the regVal for first iteration in SGD optimizer

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

    https://github.com/apache/spark/pull/40
  
    **[Test build #83 has finished](https://jenkins.test.databricks.com/job/spark-pull-request-builder/83/consoleFull)** for PR 40 at commit [`fb4eee1`](https://github.com/apache/spark/commit/fb4eee1c15bf8cbd27d8d18c46df60c507aed311).
     * This patch passes all 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 pull request: Initialized the regVal for first iteration in ...

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

    https://github.com/apache/spark/pull/40#issuecomment-36413637
  
    One or more automated tests failed
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/12936/


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

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

Posted by mengxr <gi...@git.apache.org>.
Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/40#discussion_r10178907
  
    --- Diff: mllib/src/test/scala/org/apache/spark/mllib/optimization/GradientDescentSuite.scala ---
    @@ -104,4 +104,45 @@ class GradientDescentSuite extends FunSuite with LocalSparkContext with ShouldMa
         val lossDiff = loss.init.zip(loss.tail).map { case (lhs, rhs) => lhs - rhs }
         assert(lossDiff.count(_ > 0).toDouble / lossDiff.size > 0.8)
       }
    +
    +  test("Test the loss and gradient of first iteration with regularization.") {
    +
    +    val gradient = new LogisticGradient()
    +    val updater = new SquaredL2Updater()
    +
    +    // Add a extra variable consisting of all 1.0's for the intercept.
    +    val testData = GradientDescentSuite.generateGDInput(2.0, -1.5, 10000, 42)
    +    val data = testData.map { case LabeledPoint(label, features) =>
    +      label -> Array(1.0, features: _*)
    +    }
    +
    +    val dataRDD = sc.parallelize(data, 2).cache()
    +
    +    // Prepare non-zero weights
    +    val initialWeightsWithIntercept = Array(1.0, 0.5)
    +
    +    val regParam0 = 0
    +    val (newWeights0, loss0) = GradientDescent.runMiniBatchSGD(
    +      dataRDD, gradient, updater, 1, 1, regParam0, 1.0, initialWeightsWithIntercept)
    +
    +    val regParam1 = 1
    +    val (newWeights1, loss1) = GradientDescent.runMiniBatchSGD(
    +      dataRDD, gradient, updater, 1, 1, regParam1, 1.0, initialWeightsWithIntercept)
    +
    +    def compareDouble(x: Double, y: Double, tol: Double = 1E-3): Boolean = {
    +      math.abs(x - y) / (math.abs(y) + 1e-15) < tol
    +    }
    +
    +    assert(compareDouble(
    +      loss1(0),
    +      loss0(0) + (math.pow(initialWeightsWithIntercept(0), 2) +
    +        math.pow(initialWeightsWithIntercept(1), 2)) / 2),
    +      """For non-zero weights, the regVal should be \frac{1}{2}\sum_i w_i^2.""")
    +
    +    assert(
    +      compareDouble(newWeights1(0) , newWeights0(0) - initialWeightsWithIntercept(0)) &&
    +      compareDouble(newWeights1(1) , newWeights0(1) - initialWeightsWithIntercept(1)),
    +      "The different between newWeights with/without regularization " +
    +        "should be initialWeightsWithIntercept")
    --- End diff --
    
    Missing a period at the end.


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

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/40#issuecomment-36449243
  
    I think the asf git bot will close this once  the change is sync-ed on github. If it doesn't get closed tomorrow morning, please close this manually. 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.
---

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

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

    https://github.com/apache/spark/pull/40#issuecomment-36413264
  
     Merged build triggered.


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

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

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

    https://github.com/apache/spark/pull/40#issuecomment-36413266
  
    Merged build started.


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

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

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

    https://github.com/apache/spark/pull/40#issuecomment-36413277
  
    One or more automated tests failed
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder%20(incubator)/1/


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

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

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

    https://github.com/apache/spark/pull/40#issuecomment-36413273
  
     Merged build triggered.


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

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

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

    https://github.com/apache/spark/pull/40#issuecomment-36414270
  
    Merged build finished.


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

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

Posted by mengxr <gi...@git.apache.org>.
Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/40#discussion_r10178847
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/optimization/GradientDescent.scala ---
    @@ -149,7 +149,13 @@ object GradientDescent extends Logging {
     
         // Initialize weights as a column vector
         var weights = new DoubleMatrix(initialWeights.length, 1, initialWeights:_*)
    -    var regVal = 0.0
    +
    +    /**
    +     * For the first iteration, the regVal will be initialized as sum of sqrt of
    +     * weights if it's L2 update; for L1 update; the same logic is followed.
    +     */
    +    var regVal = updater.compute(weights,
    +      new DoubleMatrix(initialWeights.length, 1), 0, 1, regParam)._2
    --- End diff --
    
    The following looks better to me, but I'm not sure. @rxin ?
    ~~~
    var regVal = updater.compute(
      weights,
      new DoubleMatrix(initialWeights.length, 1), 0, 1, regParam
    )._2
    ~~~


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

[GitHub] spark issue #40: Initialized the regVal for first iteration in SGD optimizer

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

    https://github.com/apache/spark/pull/40
  
    **[Test build #84 has finished](https://jenkins.test.databricks.com/job/spark-pull-request-builder/84/consoleFull)** for PR 40 at commit [`c8911aa`](https://github.com/apache/spark/commit/c8911aa00cb85c3db526e3ccd2afe94bd8fe7375).
     * This patch passes all 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 pull request: Initialized the regVal for first iteration in ...

Posted by dbtsai <gi...@git.apache.org>.
Github user dbtsai commented on a diff in the pull request:

    https://github.com/apache/spark/pull/40#discussion_r10181447
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/optimization/GradientDescent.scala ---
    @@ -149,7 +149,13 @@ object GradientDescent extends Logging {
     
         // Initialize weights as a column vector
         var weights = new DoubleMatrix(initialWeights.length, 1, initialWeights:_*)
    -    var regVal = 0.0
    +
    +    /**
    +     * For the first iteration, the regVal will be initialized as sum of sqrt of
    +     * weights if it's L2 update; for L1 update; the same logic is followed.
    +     */
    +    var regVal = updater.compute(weights,
    +      new DoubleMatrix(initialWeights.length, 1), 0, 1, regParam)._2
    --- End diff --
    
    I saw code in spark codebase written in this way. 
    
        var regVal = updater.compute(
          weights,
          new DoubleMatrix(initialWeights.length, 1), 0, 1, regParam)._2
    
    What do you think?


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

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/40#discussion_r10188555
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/optimization/GradientDescent.scala ---
    @@ -149,7 +149,14 @@ object GradientDescent extends Logging {
     
         // Initialize weights as a column vector
         var weights = new DoubleMatrix(initialWeights.length, 1, initialWeights:_*)
    -    var regVal = 0.0
    +
    +    /**
    +     * For the first iteration, the regVal will be initialized as sum of sqrt of
    +     * weights if it's L2 update; for L1 update; the same logic is followed.
    +     */
    +    var regVal = updater.compute(
    --- End diff --
    
    just a nit style pick here since @mengxr asked me to chime in.
    
    it would be better if you just put weights and the rest on the same line, e.g.
    
    ```scala
    var regVal = updater.compute(
      weights, new DoubleMatrix(initialWeights.length, 1), 0, 1, regParam)._2
    ```


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

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/40#issuecomment-36413377
  
    It's not you. There was somehow two Jenkins pull request builder setup ... I Just removed one of them. 


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

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

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

    https://github.com/apache/spark/pull/40#issuecomment-36413276
  
    Merged build finished.


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

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/40#issuecomment-36449165
  
    Thanks. I've merged this.



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

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

Posted by dbtsai <gi...@git.apache.org>.
Github user dbtsai commented on the pull request:

    https://github.com/apache/spark/pull/40#issuecomment-36413338
  
    @rxin It seems that I rebased and squashed the commits which made Jenkins unhappy. Could you ask Jenkins to build again? 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.
---

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

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

    https://github.com/apache/spark/pull/40#issuecomment-36306177
  
    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.
---

[GitHub] spark issue #40: Initialized the regVal for first iteration in SGD optimizer

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

    https://github.com/apache/spark/pull/40
  
    **[Test build #84 has started](https://jenkins.test.databricks.com/job/spark-pull-request-builder/84/consoleFull)** for PR 40 at commit [`c8911aa`](https://github.com/apache/spark/commit/c8911aa00cb85c3db526e3ccd2afe94bd8fe7375).


---
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: Initialized the regVal for first iteration in ...

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

    https://github.com/apache/spark/pull/40#issuecomment-36306198
  
    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.
---

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

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

    https://github.com/apache/spark/pull/40#issuecomment-36413636
  
    Merged build finished.


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

[GitHub] spark pull request: Initialized the regVal for first iteration in ...

Posted by dbtsai <gi...@git.apache.org>.
Github user dbtsai commented on a diff in the pull request:

    https://github.com/apache/spark/pull/40#discussion_r10188617
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/optimization/GradientDescent.scala ---
    @@ -149,7 +149,14 @@ object GradientDescent extends Logging {
     
         // Initialize weights as a column vector
         var weights = new DoubleMatrix(initialWeights.length, 1, initialWeights:_*)
    -    var regVal = 0.0
    +
    +    /**
    +     * For the first iteration, the regVal will be initialized as sum of sqrt of
    +     * weights if it's L2 update; for L1 update; the same logic is followed.
    +     */
    +    var regVal = updater.compute(
    --- End diff --
    
    Cool. Changed as you suggested.


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

[GitHub] spark issue #40: Initialized the regVal for first iteration in SGD optimizer

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

    https://github.com/apache/spark/pull/40
  
    **[Test build #83 has started](https://jenkins.test.databricks.com/job/spark-pull-request-builder/83/consoleFull)** for PR 40 at commit [`fb4eee1`](https://github.com/apache/spark/commit/fb4eee1c15bf8cbd27d8d18c46df60c507aed311).


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