Github user dbtsai commented on a diff in the pull request:

    https://github.com/apache/spark/pull/702#discussion_r12499609
  
    --- Diff: docs/mllib-optimization.md ---
    @@ -163,3 +177,100 @@ each iteration, to compute the gradient direction.
     Available algorithms for gradient descent:
     
     * 
[GradientDescent.runMiniBatchSGD](api/mllib/index.html#org.apache.spark.mllib.optimization.GradientDescent)
    +
    +### Limited-memory BFGS
    +L-BFGS is currently only a low-level optimization primitive in `MLlib`. If 
you want to use L-BFGS in various 
    +ML algorithms such as Linear Regression, and Logistic Regression, you have 
to pass the gradient of objective
    +function, and updater into optimizer yourself instead of using the 
training APIs like 
    
+[LogisticRegression.LogisticRegressionWithSGD](api/mllib/index.html#org.apache.spark.mllib.classification.LogisticRegression).
    +See the example below. It will be addressed in the next release. 
    +
    +The L1 regularization by using 
    
+[Updater.L1Updater](api/mllib/index.html#org.apache.spark.mllib.optimization.Updater)
 will not work since the 
    +soft-thresholding logic in L1Updater is designed for gradient descent.
    +
    +The L-BFGS method
    
+[LBFGS.runLBFGS](api/scala/index.html#org.apache.spark.mllib.optimization.LBFGS)
    +has the following parameters:
    +
    +* `gradient` is a class that computes the gradient of the objective 
function
    +being optimized, i.e., with respect to a single training example, at the
    +current parameter value. MLlib includes gradient classes for common loss
    +functions, e.g., hinge, logistic, least-squares.  The gradient class takes 
as
    +input a training example, its label, and the current parameter value. 
    +* `updater` is a class originally designed for gradient decent which 
computes 
    --- End diff --
    
    Agree. I will move it into the comment in the code.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to