4 generateRunSaveTest_EMGLLF = function(n=200, p=15, m=10, k=3, mini=5, maxi=10,
5 gamma=1., lambda=0.5, tau=1e-6)
8 dir.create(testFolder, showWarnings=FALSE, mode="0755")
10 params = basicInitParameters(n, p, m, k)
11 xy = generateXYdefault(n, p, m, k)
14 write.table(as.double(params$phiInit), paste(testFolder,"phiInit",sep=""),
15 row.names=F, col.names=F)
16 write.table(as.double(params$rhoInit), paste(testFolder,"rhoInit",sep=""),
17 row.names=F, col.names=F)
18 write.table(as.double(params$piInit), paste(testFolder,"piInit",sep=""),
19 row.names=F, col.names=F)
20 write.table(as.double(params$gamInit), paste(testFolder,"gamInit",sep=""),
21 row.names=F, col.names=F)
22 write.table(as.integer(mini), paste(testFolder,"mini",sep=""),
23 row.names=F, col.names=F)
24 write.table(as.integer(maxi), paste(testFolder,"maxi",sep=""),
25 row.names=F, col.names=F)
26 write.table(as.double(gamma), paste(testFolder,"gamma",sep=""),
27 row.names=F, col.names=F)
28 write.table(as.double(lambda), paste(testFolder,"lambda",sep=""),
29 row.names=F, col.names=F)
30 write.table(as.double(xy$X), paste(testFolder,"X",sep=""),
31 row.names=F, col.names=F)
32 write.table(as.double(xy$Y), paste(testFolder,"Y",sep=""),
33 row.names=F, col.names=F)
34 write.table(as.double(tau), paste(testFolder,"tau",sep=""),
35 row.names=F, col.names=F)
36 write.table(as.integer(c(n,p,m,k)), paste(testFolder,"dimensions",sep=""),
37 row.names=F, col.names=F)
39 res = valse::EMGLLF(params$phiInit,params$rhoInit,params$piInit,params$gamInit,mini,
40 maxi,gamma,lambda,xy$X,xy$Y,tau,fast=FALSE)
43 write.table(as.double(res$phi),paste(testFolder,"phi",sep=""),row.names=F,col.names=F)
44 write.table(as.double(res$rho),paste(testFolder,"rho",sep=""),row.names=F,col.names=F)
45 write.table(as.double(res$pi),paste(testFolder,"pi",sep=""),row.names=F,col.names=F)
46 write.table(as.double(res$llh),paste(testFolder,"llh",sep=""),row.names=F,col.names=F)
47 write.table(as.double(res$S),paste(testFolder,"S",sep=""),row.names=F,col.names=F)
48 write.table(as.integer(res$affec),paste(testFolder,"affec",sep=""),row.names=F,col.names=F)