[
https://issues.apache.org/jira/browse/SPARK-8587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14600825#comment-14600825
]
Sam Stoelinga commented on SPARK-8587:
--------------------------------------
I also agree that this should have the same API accross the different
languages. There is already a function computeCost but the problem is that it
doesn't return the index, the problem with predict is that it only returns the
index and not the cost.
> Return cost and cluster index KMeansModel.predict
> -------------------------------------------------
>
> Key: SPARK-8587
> URL: https://issues.apache.org/jira/browse/SPARK-8587
> Project: Spark
> Issue Type: Improvement
> Components: MLlib
> Reporter: Sam Stoelinga
> Priority: Minor
>
> Looking at PySpark the implementation of KMeansModel.predict
> https://github.com/apache/spark/blob/master/python/pyspark/mllib/clustering.py#L102
> :
> Currently:
> it calculates the cost of the closest cluster and returns the index only.
> My expectation:
> Easy way to let the same function or a new function to return the cost with
> the index.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]