You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2019/05/21 04:24:04 UTC
[jira] [Updated] (SPARK-16108) Why is KMeansModel (scala) private?
[ https://issues.apache.org/jira/browse/SPARK-16108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyukjin Kwon updated SPARK-16108:
---------------------------------
Labels: bulk-closed easyfix (was: easyfix)
> 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
> Labels: bulk-closed, easyfix
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> 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 concretely, imagine I wanted to extend the KMeans class and still be compatible with the 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
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org