Return-Path: X-Original-To: apmail-spark-dev-archive@minotaur.apache.org Delivered-To: apmail-spark-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4619A10CB8 for ; Thu, 27 Feb 2014 23:43:36 +0000 (UTC) Received: (qmail 94405 invoked by uid 500); 27 Feb 2014 23:43:35 -0000 Delivered-To: apmail-spark-dev-archive@spark.apache.org Received: (qmail 94306 invoked by uid 500); 27 Feb 2014 23:43:35 -0000 Mailing-List: contact dev-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@spark.apache.org Delivered-To: mailing list dev@spark.apache.org Received: (qmail 94298 invoked by uid 99); 27 Feb 2014 23:43:34 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Feb 2014 23:43:34 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id AFF5492FD72; Thu, 27 Feb 2014 23:43:34 +0000 (UTC) From: dbtsai To: dev@spark.apache.org Reply-To: dev@spark.apache.org Message-ID: Subject: [GitHub] spark pull request: Initialized the regVal for first iteration in ... Content-Type: text/plain Date: Thu, 27 Feb 2014 23:43:34 +0000 (UTC) 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 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 Date: 2014-02-25T22:02:12Z Added unittest for the change in runMiniBatchSGD commit 594a288acd91dd9b426d9327f2b8f4db828321d3 Author: DB Tsai 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. ---