You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@systemml.apache.org by GitBox <gi...@apache.org> on 2020/06/17 23:19:28 UTC

[GitHub] [systemml] Shafaq-Siddiqi opened a new pull request #976: [WIP]: [SYSTEMDS-200] Gaussian Mixture Model builtin

Shafaq-Siddiqi opened a new pull request #976:
URL: https://github.com/apache/systemml/pull/976


   New Builtin for Gaussian Mixture Model with four covariance types namely VVV, EEE, diag and spherical (please see the script header for more details).
   
   Spark tests for using kmeans as initialization function are commented out due to a runtime exception in kmeans  execution on the following instruction. 
   
   SPARK°rexpand°cast=true°max=_Var872°ignore=false°dir=cols°target=_mVar884°_mVar885·MATRIX·FP64


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [systemml] Shafaq-Siddiqi commented on a change in pull request #976: [SYSTEMDS-200] Gaussian Mixture Model builtin

Posted by GitBox <gi...@apache.org>.
Shafaq-Siddiqi commented on a change in pull request #976:
URL: https://github.com/apache/systemml/pull/976#discussion_r442314756



##########
File path: src/test/java/org/apache/sysds/test/functions/builtin/BuiltinGMMTest.java
##########
@@ -44,69 +45,66 @@
 		addTestConfiguration(TEST_NAME, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME, new String[] {"B"}));
 	}
 
-	@Test public void testGMMM1() { runGMMTest(3, "VVV", "random", 100, 0.000001, 2, LopProperties.ExecType.CP); }
+	@Test public void testGMMM1() { runGMMTest(3, "VVV", "random", 100, 0.000001, true, LopProperties.ExecType.CP); }
 
 	@Test public void testGMMM2() {
-		runGMMTest(3, "EEE", "random", 100, 0.000001, 2, LopProperties.ExecType.CP);
+		runGMMTest(3, "EEE", "random", 100, 0.000001, true, LopProperties.ExecType.CP);
 	}
 
 	@Test public void testGMMM3() {
-		runGMMTest(3, "VVI", "random", 100, 0.000001, 2, LopProperties.ExecType.CP);
+		runGMMTest(3, "VVI", "random", 100, 0.000001, true, LopProperties.ExecType.CP);
 	}
 
 	@Test public void testGMMM4() {
-		runGMMTest(3, "VII", "random", 100, 0.000001, 2, LopProperties.ExecType.CP);
+		runGMMTest(3, "VII", "random", 100, 0.000001, true, LopProperties.ExecType.CP);
 	}
 
 	@Test public void testGMMM1Kmean() {
-		runGMMTest(3, "VVV", "kmeans", 100, 0.000001, 2, LopProperties.ExecType.CP);
+		runGMMTest(3, "VVV", "kmeans", 100, 0.000001, true, LopProperties.ExecType.CP);
 	}
 
 	@Test public void testGMMM2Kmean() {
-		runGMMTest(3, "EEE", "kmeans", 100, 0.000001, 2, LopProperties.ExecType.CP);
+		runGMMTest(3, "EEE", "kmeans", 100, 0.000001, true, LopProperties.ExecType.CP);
 	}
 
 	@Test public void testGMMM3Kmean() {
-		runGMMTest(3, "VVI", "kmeans", 100, 0.000001, 2, LopProperties.ExecType.CP);
+		runGMMTest(3, "VVI", "kmeans", 100, 0.000001, true, LopProperties.ExecType.CP);
 	}
 
 	@Test public void testGMMM4Kmean() {
-		runGMMTest(3, "VII", "kmeans", 100, 0.000001, 2, LopProperties.ExecType.CP);
+		runGMMTest(3, "VII", "kmeans", 100, 0.000001, true, LopProperties.ExecType.CP);
 	}
 
-	@Test public void testGMMM1Spark() { runGMMTest(3, "VVV", "random", 100, 0.000001, 2, LopProperties.ExecType.SPARK); }
+	@Test public void testGMMM1Spark() { runGMMTest(3, "VVV", "random", 100, 0.000001, true, LopProperties.ExecType.SPARK); }
 
 	@Test public void testGMMM2Spark() {
-		runGMMTest(3, "EEE", "random", 100, 0.000001, 2, LopProperties.ExecType.CP);
+		runGMMTest(3, "EEE", "random", 100, 0.000001, true, LopProperties.ExecType.CP);
 	}
 
 	@Test public void testGMMMS3Spark() {
-		runGMMTest(3, "VVI", "random", 100, 0.000001, 2, LopProperties.ExecType.CP);
+		runGMMTest(3, "VVI", "random", 100, 0.000001, true, LopProperties.ExecType.CP);
 	}
 
 	@Test public void testGMMM4Spark() {
-		runGMMTest(3, "VII", "random", 100, 0.000001, 2, LopProperties.ExecType.CP);
+		runGMMTest(3, "VII", "random", 100, 0.000001, true, LopProperties.ExecType.CP);
 	}
 
-//	@Test public void testGMMM1KmeanSpark() {
-//		runGMMTest(3, "VVV", "kmeans", 100, 0.000001, 2, LopProperties.ExecType.SPARK);
-//	}
-//
-//	@Test public void testGMMM2KmeanSpark() {
-//		runGMMTest(3, "EEE", "kmeans", 100, 0.000001, 2, LopProperties.ExecType.SPARK);
-//	}
-//
-//	@Test public void testGMMM3KmeanSpark() {
-//		runGMMTest(3, "VVI", "kmeans", 100, 0.000001, 2, LopProperties.ExecType.SPARK);
-//	}
-//
-//	@Test public void testGMMM4KmeanSpark() {
-//		runGMMTest(3, "VII", "kmeans", 100, 0.000001, 2, LopProperties.ExecType.SPARK);
-//	}
-
-	private void runGMMTest(int G_mixtures, String model, String init_param, int iter, double reg, int test,
+	@Test public void testGMMM1KmeanSpark() {
+		runGMMTest(3, "VVV", "kmeans", 100, 0.000001, false, LopProperties.ExecType.SPARK);
+	}
+
+	@Test public void testGMMM3KmeanSpark() {
+		runGMMTest(3, "VVI", "kmeans", 100, 0.000001, false, LopProperties.ExecType.SPARK);
+	}
+
+	@Test public void testGMMM4KmeanSpark() {
+		runGMMTest(3, "VII", "kmeans", 100, 0.000001, false, LopProperties.ExecType.SPARK);
+	}
+
+	private void runGMMTest(int G_mixtures, String model, String init_param, int iter, double reg, boolean rewrite,
 			LopProperties.ExecType instType) {
 		Types.ExecMode platformOld = setExecMode(instType);
+		OptimizerUtils.ALLOW_ALGEBRAIC_SIMPLIFICATION = rewrite;

Review comment:
       Spark test passed after setting OptimizerUtils.ALLOW_ALGEBRAIC_SIMPLIFICATION to false.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org