You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2015/03/29 09:51:52 UTC

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

    [ https://issues.apache.org/jira/browse/SPARK-6580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14385664#comment-14385664 ] 

Apache Spark commented on SPARK-6580:
-------------------------------------

User 'yanboliang' has created a pull request for this issue:
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
>            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