GitHub user yanboliang opened a pull request:

    https://github.com/apache/spark/pull/11367

    [SPARK-13490] [ML] ML LinearRegression should cache standardization param 
value

    ## What changes were proposed in this pull request?
    Like [SPARK-13132](https://issues.apache.org/jira/browse/SPARK-13132) for 
LogisticRegression, when LinearRegression with L1 regularization, the inner 
functor passed to the quasi-newton optimizer in 
```org.apache.spark.ml.regression.LinearRegression#train``` makes repeated 
calls to ```$(standardization)```. This ultimately involves repeated string 
interpolation triggered by ```org.apache.spark.ml.param.Param#hashCode```. We 
should cache the value of the ```standardization``` rather than re-fetching it 
from the ParamMap for every iteration.
    
    ## How was this patch tested?
    No extra tests are added. It should pass all existing tests. 
    
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/yanboliang/spark spark-13490

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/11367.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #11367
    
----
commit f9c79b136ac41bd91f482a4f948acb780f493516
Author: Yanbo Liang <[email protected]>
Date:   2016-02-25T09:35:57Z

    ML LinearRegression should cache standardization param value

----


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to