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

    https://github.com/apache/spark/pull/15394#discussion_r83091619
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/optim/WeightedLeastSquares.scala ---
    @@ -45,34 +47,48 @@ private[ml] class WeightedLeastSquaresModel(
      * formulation:
      *
      * min,,x,z,, 1/2 sum,,i,, w,,i,, (a,,i,,^T^ x + z - b,,i,,)^2^ / sum,,i,, 
w_i
    - *   + 1/2 lambda / delta sum,,j,, (sigma,,j,, x,,j,,)^2^,
    + *   + lambda / delta (1/2 (1 - alpha) sum,,j,, (sigma,,j,, x,,j,,)^2^
    + *   + alpha sum,,j,, abs(sigma,,j,, x,,j,,)),
      *
    - * where lambda is the regularization parameter, and delta and sigma,,j,, 
are controlled by
    - * [[standardizeLabel]] and [[standardizeFeatures]], respectively.
    + * where lambda is the regularization parameter, alpha is the ElasticNet 
mixing parameter,
    + * and delta and sigma,,j,, are controlled by [[standardizeLabel]] and 
[[standardizeFeatures]],
    + * respectively.
      *
      * Set [[regParam]] to 0.0 and turn off both [[standardizeFeatures]] and 
[[standardizeLabel]] to
      * match R's `lm`.
      * Turn on [[standardizeLabel]] to match R's `glmnet`.
      *
      * @param fitIntercept whether to fit intercept. If false, z is 0.0.
    - * @param regParam L2 regularization parameter (lambda)
    + * @param regParam L2 regularization parameter (lambda).
    + * @param elasticNetParam the ElasticNet mixing parameter.
      * @param standardizeFeatures whether to standardize features. If true, 
sigma_,,j,, is the
      *                            population standard deviation of the j-th 
column of A. Otherwise,
      *                            sigma,,j,, is 1.0.
      * @param standardizeLabel whether to standardize label. If true, delta is 
the population standard
      *                         deviation of the label column b. Otherwise, 
delta is 1.0.
    + * @param solverType the type of solver to use for optimization.
    + * @param maxIter maximum number of iterations when stochastic 
optimization is used.
    + * @param tol the convergence tolerance of the iterations when stochastic 
optimization is used.
    --- End diff --
    
    done


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to