You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "DB Tsai (JIRA)" <ji...@apache.org> on 2016/10/06 01:46:20 UTC

[jira] [Commented] (SPARK-17789) Don't force users to set k for KMeans if initial model is set

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

DB Tsai commented on SPARK-17789:
---------------------------------

Why the above code will throw a runtime exception? (you don't reset the k yet).

> Don't force users to set k for KMeans if initial model is set
> -------------------------------------------------------------
>
>                 Key: SPARK-17789
>                 URL: https://issues.apache.org/jira/browse/SPARK-17789
>             Project: Spark
>          Issue Type: Improvement
>          Components: ML
>            Reporter: Seth Hendrickson
>            Priority: Minor
>
> In the initial implementation of initalModel, we allow users to set the initial model with a KMeansModel that has a different {{k}} than the current model. We throw an error at train time if the two are mismatched. This means that the following code throws a runtime exception:
> {{code}}
> val kmeansModel = new KMeans().setInitialModel(model).fit(df)
> {{code}}
> We should discuss this behavior, and decide if we should enforce users to set both the initial model and k, or if we should alter k when the initial model is set, or if we should keep the current behavior.



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