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

Joseph K. Bradley commented on SPARK-5400:
------------------------------------------

I agree this could be done either way: Algorithm[Model] or Model[Algorithm].  
For users, exposing the model type may be easiest; a person who is new to ML 
and wants to do some clustering will know the name of a clustering model 
(KMeans, GMM) but may not want to worry about picking an optimization 
algorithm.  So I'd vote for Model[Algorithm].

That said, internally, I agree that Algorithm[Model] would be handy for 
generalizing.  We could do the combination by having an internal LearningState 
class:

{code}
class GaussianMixture {
  def setOptimizer // once we have more than 1 optimization method

  def run = {
    val opt = new EM(new GMMLearningState(this))
    ...
  }
}

private[mllib] GMMLearningState extends OurModelAbstraction {
  def this(gm: GaussianMixture) = this(...)
}

class EM(model: OurModelAbstraction)
{code}


> Rename GaussianMixtureEM to GaussianMixture
> -------------------------------------------
>
>                 Key: SPARK-5400
>                 URL: https://issues.apache.org/jira/browse/SPARK-5400
>             Project: Spark
>          Issue Type: Improvement
>          Components: MLlib
>    Affects Versions: 1.3.0
>            Reporter: Joseph K. Bradley
>            Priority: Minor
>
> GaussianMixtureEM is following the old naming convention of including the 
> optimization algorithm name in the class title.  We should probably rename it 
> to GaussianMixture so that it can use other optimization algorithms in the 
> future.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to