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

    https://github.com/apache/spark/pull/8013#discussion_r36718958
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/regression/LinearRegression.scala ---
    @@ -645,3 +658,80 @@ private class LeastSquaresCostFun(
         (leastSquaresAggregator.loss + regVal, new BDV(totalGradientArray))
       }
     }
    +
    +/**
    + * HuberCostFun implements Breeze's DiffFunction[T] for Huber cost as used 
in Robust regression.
    + * The Huber M-estimator corresponds to a probability distribution for the 
errors which is normal
    + * in the centre but like a double exponential distribution in the tails 
(Hogg 1979: 109).
    + * L = 1/2 ||A weights-y||^2 if |A weights-y| <= k
    + * L = k |A weights-y| - 1/2 K^2 if |A weights-y| > k
    + * where k = 1.345 which produce 95% efficiency when the errors are normal 
and
    --- End diff --
    
    Is it possible to make k tunable and default to 1.345 by having another 
param?


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