You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Rémi Delassus (JIRA)" <ji...@apache.org> on 2016/06/22 08:41:58 UTC
[jira] [Comment Edited] (SPARK-16108) Why is KMeansModel (scala)
private?
[ https://issues.apache.org/jira/browse/SPARK-16108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15343918#comment-15343918 ]
Rémi Delassus edited comment on SPARK-16108 at 6/22/16 8:41 AM:
----------------------------------------------------------------
Do you mean that it is designed (and well thought) to prevent people from extending it?
But only in scala?
was (Author: remi.delassus@gmail.com):
Do you mean that it is designed (and well thought) to prevent people from extended it?
But only in scala?
> 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: 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
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org