You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xiangrui Meng (JIRA)" <ji...@apache.org> on 2015/04/02 02:14:52 UTC

[jira] [Updated] (SPARK-6580) Optimize LogisticRegressionModel.predictPoint

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

Xiangrui Meng updated SPARK-6580:
---------------------------------
    Assignee: Yanbo Liang

> 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
>
> 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org