You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Florian Golemo (JIRA)" <ji...@apache.org> on 2016/06/21 16:59:58 UTC

[jira] [Created] (SPARK-16108) Why is KMeansModel (scala) private?

Florian Golemo created SPARK-16108:
--------------------------------------

             Summary: Why is KMeansModel (scala) private?
                 Key: SPARK-16108
                 URL: https://issues.apache.org/jira/browse/SPARK-16108
             Project: Spark
          Issue Type: Improvement
          Components: ML
    Affects Versions: 1.6.1
            Reporter: Florian Golemo
            Priority: Minor


Hey guys, 

I was wondering, in the file KMeans.scala (org/apache/spark/ml/clustering/KMeans.scala), the class KMeansModel is private. But only in Scala, not in Java - why is that, and why would that be a good idea?

More conretely, image I wanted to extend the KMeans class and still be compatible with API so I can use it in a pipeline. In Scala that's not possible, because I can't override the 'fit' method of KMeans, because that requires me to return a KMeansModel, which I can't instantiate because the constructor of KMeansModel is private.

If there is no apparent reason we could just make it public, no?




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