facilitate test
authorBenjamin Auder <benjamin.auder@somewhere>
Thu, 23 Feb 2017 15:34:51 +0000 (16:34 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Thu, 23 Feb 2017 15:34:51 +0000 (16:34 +0100)
src/test/Makefile
src/test/generate_test_data/generateRunSaveTest_EMGLLF.R
src/test/generate_test_data/generateRunSaveTest_EMGrank.R
src/test/generate_test_data/generateRunSaveTest_constructionModelesLassoMLE.R
src/test/generate_test_data/generateRunSaveTest_constructionModelesLassoRank.R

index d582826..26d9bc6 100644 (file)
@@ -36,6 +36,6 @@ clean:
        rm -f *.o ../sources/*.o ../adapters/*.o
 
 cclean: clean
-       rm -f $(LIB) $(TESTS)
+       rm -f *.so $(TESTS)
 
 .PHONY: all clean cclean
index 49e2258..ff797dc 100644 (file)
@@ -1,7 +1,9 @@
+source("helpers/EMGLLF.R")
+
 generateRunSaveTest_EMGLLF = function(n=200, p=15, m=10, k=3, mini=5, maxi=10,
        gamma=1., lambda=0.5, tau=1e-6)
 {
-       testFolder = "data/"
+       testFolder = "../data/"
        dir.create(testFolder, showWarnings=FALSE, mode="0755")
 
        require(valse)
@@ -31,7 +33,7 @@ generateRunSaveTest_EMGLLF = function(n=200, p=15, m=10, k=3, mini=5, maxi=10,
                row.names=F, col.names=F)
        write.table(as.double(tau), paste(testFolder,"tau",sep=""),
                row.names=F, col.names=F)
-       write.table(as.integer(c(n,p,m,k)), paste(testFolder,"dimensxyns",sep=""),
+       write.table(as.integer(c(n,p,m,k)), paste(testFolder,"dimensions",sep=""),
                row.names=F, col.names=F)
 
        res = EMGLLF(params$phiInit,params$rhoInit,params$piInit,params$gamInit,mini,maxi,
index a690cf5..246cb58 100644 (file)
@@ -1,3 +1,5 @@
+source("helpers/EMGrank.R")
+
 generateRunSaveTest_EMGrank = function(n=200, p=15, m=10, k=3, mini=5, maxi=10, gamma=1.0,
        rank = c(1,2,4))
 {
@@ -9,7 +11,7 @@ generateRunSaveTest_EMGrank = function(n=200, p=15, m=10, k=3, mini=5, maxi=10,
        require(valse)
   xy = valse:::generateXYdefault(n, p, m, k)
 
-  testFolder = "data/"
+  testFolder = "../data/"
   dir.create(testFolder, showWarnings=FALSE, mode="0755")
   #save inputs
   write.table(as.double(rho), paste(testFolder,"rho",sep=""),
@@ -28,7 +30,7 @@ generateRunSaveTest_EMGrank = function(n=200, p=15, m=10, k=3, mini=5, maxi=10,
                row.names=F, col.names=F)
   write.table(as.integer(rank), paste(testFolder,"rank",sep=""),
                row.names=F, col.names=F)
-  write.table(as.integer(c(n,p,m,k)), paste(testFolder,"dimensxyns",sep=""),
+  write.table(as.integer(c(n,p,m,k)), paste(testFolder,"dimensions",sep=""),
                row.names=F, col.names=F)
 
   res = EMGrank(pi,rho,mini,maxi,xy$X,xy$Y,tau,rank)
index 210fe3c..dbce359 100644 (file)
@@ -1,3 +1,5 @@
+source("helpers/constructionModelesLassoMLE.R")
+
 generateRunSaveTest_constructionModelesLassoMLE = function(n=200, p=15, m=10, k=3, mini=5,
        maxi=10, gamma=1.0, glambda=list(0.0,0.01,0.02,0.03,0.05,0.1,0.2,0.3,0.5,0.7,0.85,0.99))
 {
@@ -17,7 +19,7 @@ generateRunSaveTest_constructionModelesLassoMLE = function(n=200, p=15, m=10, k=
   params = valse:::basicInitParameters(n, p, m, k)
   xy = valse:::generateXYdefault(n, p, m, k)
 
-  testFolder = "data/"
+  testFolder = "../data/"
   dir.create(testFolder, showWarnings=FALSE, mode="0755")
   #save inputs
   write.table(as.double(params$phiInit), paste(testFolder,"phiInit",sep=""),
index 7dd7a2e..559bd9e 100644 (file)
@@ -1,3 +1,5 @@
+source("helpers/constructionModelesLassoRank.R")
+
 generateRunSaveTest_constructionModelesLassoRank = function(n=200, p=15, m=10, k=3, L=12, mini=5,
        maxi=10, gamma=1.0, rangmin=3, rangmax=6)
 {
@@ -13,7 +15,7 @@ generateRunSaveTest_constructionModelesLassoRank = function(n=200, p=15, m=10, k
        require(valse)
   xy = valse:::generateXYdefault(n, p, m, k)
 
-  testFolder = "data/"
+  testFolder = "../data/"
   dir.create(testFolder, showWarnings=FALSE, mode="0755")
   #save inputs
   write.table(as.double(pi), paste(testFolder,"pi",sep=""),