spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Owen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-18808) ml.KMeansModel.transform is very inefficient
Date Fri, 30 Dec 2016 10:40:58 GMT

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

Sean Owen updated SPARK-18808:
------------------------------
    Priority: Minor  (was: Major)

> ml.KMeansModel.transform is very inefficient
> --------------------------------------------
>
>                 Key: SPARK-18808
>                 URL: https://issues.apache.org/jira/browse/SPARK-18808
>             Project: Spark
>          Issue Type: Improvement
>          Components: ML
>    Affects Versions: 2.0.2
>            Reporter: Michel Lemay
>            Assignee: Sean Owen
>            Priority: Minor
>             Fix For: 2.2.0
>
>
> The function ml.KMeansModel.transform will call the parentModel.predict(features) method
on each row which in turns will normalize all clusterCenters from mllib.KMeansModel.clusterCentersWithNorm
every time!
> This is a serious waste of resources!  In my profiling, clusterCentersWithNorm represent
99% of the sampling!  
> This should have been implemented with a broadcast variable as it is done in other functions
like computeCost.



--
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


Mime
View raw message