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

    https://github.com/apache/spark/pull/15394#discussion_r83079430
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/optim/WeightedLeastSquares.scala ---
    @@ -286,6 +434,24 @@ private[ml] object WeightedLeastSquares {
         }
     
         /**
    +     * Weighted population standard deviation of features.
    +     */
    +    def aStd: DenseVector = {
    +      val std = Array.ofDim[Double](k)
    +      var i = 0
    +      var j = 2
    +      val aaValues = aaSum.values
    +      while (i < triK) {
    +        val l = j - 2
    +        val aw = aSum(l) / wSum
    +        std(l) = math.sqrt(aaValues(i) / wSum - aw * aw)
    +        i += j
    +        j += 1
    +      }
    +      new DenseVector(std)
    +    }
    +
    +    /**
          * Weighted population variance of features.
          */
         def aVar: DenseVector = {
    --- End diff --
    
    I think we should keep it. It may be used in the future, but I don't feel 
strongly about it.


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