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

Apache Spark reassigned SPARK-6580:
-----------------------------------

    Assignee:     (was: Apache Spark)

> 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
>            Priority: Minor
>
> 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: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to