aboutsummaryrefslogtreecommitdiff
path: root/mllib
diff options
context:
space:
mode:
authorTravis Galoppo <tjg2107@columbia.edu>2015-01-30 15:32:25 -0800
committerXiangrui Meng <meng@databricks.com>2015-01-30 15:32:25 -0800
commit986977340d0d02dbd0346bd233dbd93b8c8e74c9 (patch)
tree44a34a98f91e1502d4cc435a1acdb113211f694f /mllib
parentf377431a578f621b599b538f069adca6accaf7a9 (diff)
downloadspark-986977340d0d02dbd0346bd233dbd93b8c8e74c9.tar.gz
spark-986977340d0d02dbd0346bd233dbd93b8c8e74c9.tar.bz2
spark-986977340d0d02dbd0346bd233dbd93b8c8e74c9.zip
SPARK-5400 [MLlib] Changed name of GaussianMixtureEM to GaussianMixture
Decoupling the model and the algorithm Author: Travis Galoppo <tjg2107@columbia.edu> Closes #4290 from tgaloppo/spark-5400 and squashes the following commits: 9c1534c [Travis Galoppo] Fixed invokation instructions in comments d848076 [Travis Galoppo] SPARK-5400 Changed name of GaussianMixtureEM to GaussianMixture to separate model from algorithm
Diffstat (limited to 'mllib')
-rw-r--r--mllib/src/main/scala/org/apache/spark/mllib/clustering/GaussianMixture.scala (renamed from mllib/src/main/scala/org/apache/spark/mllib/clustering/GaussianMixtureEM.scala)2
-rw-r--r--mllib/src/test/scala/org/apache/spark/mllib/clustering/GaussianMixtureSuite.scala (renamed from mllib/src/test/scala/org/apache/spark/mllib/clustering/GMMExpectationMaximizationSuite.scala)6
2 files changed, 4 insertions, 4 deletions
diff --git a/mllib/src/main/scala/org/apache/spark/mllib/clustering/GaussianMixtureEM.scala b/mllib/src/main/scala/org/apache/spark/mllib/clustering/GaussianMixture.scala
index 899fe5e9e9..5c626fde4e 100644
--- a/mllib/src/main/scala/org/apache/spark/mllib/clustering/GaussianMixtureEM.scala
+++ b/mllib/src/main/scala/org/apache/spark/mllib/clustering/GaussianMixture.scala
@@ -44,7 +44,7 @@ import org.apache.spark.util.Utils
* is considered to have occurred.
* @param maxIterations The maximum number of iterations to perform
*/
-class GaussianMixtureEM private (
+class GaussianMixture private (
private var k: Int,
private var convergenceTol: Double,
private var maxIterations: Int,
diff --git a/mllib/src/test/scala/org/apache/spark/mllib/clustering/GMMExpectationMaximizationSuite.scala b/mllib/src/test/scala/org/apache/spark/mllib/clustering/GaussianMixtureSuite.scala
index 198997b5bb..c2cd56ea40 100644
--- a/mllib/src/test/scala/org/apache/spark/mllib/clustering/GMMExpectationMaximizationSuite.scala
+++ b/mllib/src/test/scala/org/apache/spark/mllib/clustering/GaussianMixtureSuite.scala
@@ -24,7 +24,7 @@ import org.apache.spark.mllib.stat.distribution.MultivariateGaussian
import org.apache.spark.mllib.util.MLlibTestSparkContext
import org.apache.spark.mllib.util.TestingUtils._
-class GMMExpectationMaximizationSuite extends FunSuite with MLlibTestSparkContext {
+class GaussianMixtureSuite extends FunSuite with MLlibTestSparkContext {
test("single cluster") {
val data = sc.parallelize(Array(
Vectors.dense(6.0, 9.0),
@@ -39,7 +39,7 @@ class GMMExpectationMaximizationSuite extends FunSuite with MLlibTestSparkContex
val seeds = Array(314589, 29032897, 50181, 494821, 4660)
seeds.foreach { seed =>
- val gmm = new GaussianMixtureEM().setK(1).setSeed(seed).run(data)
+ val gmm = new GaussianMixture().setK(1).setSeed(seed).run(data)
assert(gmm.weights(0) ~== Ew absTol 1E-5)
assert(gmm.gaussians(0).mu ~== Emu absTol 1E-5)
assert(gmm.gaussians(0).sigma ~== Esigma absTol 1E-5)
@@ -68,7 +68,7 @@ class GMMExpectationMaximizationSuite extends FunSuite with MLlibTestSparkContex
val Emu = Array(Vectors.dense(-4.3673), Vectors.dense(5.1604))
val Esigma = Array(Matrices.dense(1, 1, Array(1.1098)), Matrices.dense(1, 1, Array(0.86644)))
- val gmm = new GaussianMixtureEM()
+ val gmm = new GaussianMixture()
.setK(2)
.setInitialModel(initialGmm)
.run(data)