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

    https://github.com/apache/spark/pull/15394#discussion_r83090919
  
    --- 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).
    --- End diff --
    
    I changed it to say "Regularization parameter (lambda)". Since lambda is 
specified above, it should be clear.


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