[ 
https://issues.apache.org/jira/browse/SPARK-6580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xiangrui Meng resolved SPARK-6580.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 1.4.0

Issue resolved by pull request 5249
[https://github.com/apache/spark/pull/5249]

> Optimize LogisticRegressionModel.predictPoint
> ---------------------------------------------
>
>                 Key: SPARK-6580
>                 URL: https://issues.apache.org/jira/browse/SPARK-6580
>             Project: Spark
>          Issue Type: Improvement
>          Components: MLlib
>    Affects Versions: 1.3.0
>            Reporter: Joseph K. Bradley
>            Assignee: Yanbo Liang
>            Priority: Minor
>             Fix For: 1.4.0
>
>
> LogisticRegressionModel.predictPoint could be optimized some.  There are 
> several checks which could be moved outside loops or even outside 
> predictPoint to initialization of the model.
> Some include:
> {code}
> require(numFeatures == weightMatrix.size)
> val dataWithBiasSize = weightMatrix.size / (numClasses - 1)
> val weightsArray = weightMatrix match { ...
> if (dataMatrix.size + 1 == dataWithBiasSize) {...
> {code}
> Also, for multiclass, the 2 loops (over numClasses and margins) could be 
> combined into 1 loop.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to