Skip to content
  • Joseph K. Bradley's avatar
    bd2c9a6d
    [SPARK-14732][ML] spark.ml GaussianMixture should use MultivariateGaussian in mllib-local · bd2c9a6d
    Joseph K. Bradley authored
    ## What changes were proposed in this pull request?
    
    Before, spark.ml GaussianMixtureModel used the spark.mllib MultivariateGaussian in its public API.  This was added after 1.6, so we can modify this API without breaking APIs.
    
    This PR copies MultivariateGaussian to mllib-local in spark.ml, with a few changes:
    * Renamed fields to match numpy, scipy: mu => mean, sigma => cov
    
    This PR then uses the spark.ml MultivariateGaussian in the spark.ml GaussianMixtureModel, which involves:
    * Modifying the constructor
    * Adding a computeProbabilities method
    
    Also:
    * Added EPSILON to mllib-local for use in MultivariateGaussian
    
    ## How was this patch tested?
    
    Existing unit tests
    
    Author: Joseph K. Bradley <joseph@databricks.com>
    
    Closes #12593 from jkbradley/sparkml-gmm-fix.
    bd2c9a6d
    [SPARK-14732][ML] spark.ml GaussianMixture should use MultivariateGaussian in mllib-local
    Joseph K. Bradley authored
    ## What changes were proposed in this pull request?
    
    Before, spark.ml GaussianMixtureModel used the spark.mllib MultivariateGaussian in its public API.  This was added after 1.6, so we can modify this API without breaking APIs.
    
    This PR copies MultivariateGaussian to mllib-local in spark.ml, with a few changes:
    * Renamed fields to match numpy, scipy: mu => mean, sigma => cov
    
    This PR then uses the spark.ml MultivariateGaussian in the spark.ml GaussianMixtureModel, which involves:
    * Modifying the constructor
    * Adding a computeProbabilities method
    
    Also:
    * Added EPSILON to mllib-local for use in MultivariateGaussian
    
    ## How was this patch tested?
    
    Existing unit tests
    
    Author: Joseph K. Bradley <joseph@databricks.com>
    
    Closes #12593 from jkbradley/sparkml-gmm-fix.
Loading