1 generateRunSaveTest_constructionModelesLassoMLE = function(n=200, p=15, m=10, k=3, mini=5,
2 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))
7 A1 = array(0, dim=c(p, m+1, L))
8 A2 = array(0, dim=c(p, m+1, L))
12 A1[1:5,2,i] = seq_len(5)
14 A2[1:5,2,i] = seq_len(5)
17 params = valse:::basicInitParameters(n, p, m, k)
18 xy = valse:::generateXYdefault(n, p, m, k)
21 dir.create(testFolder, showWarnings=FALSE, mode="0755")
23 write.table(as.double(params$phiInit), paste(testFolder,"phiInit",sep=""),
24 row.names=F, col.names=F)
25 write.table(as.double(params$rhoInit), paste(testFolder,"rhoInit",sep=""),
26 row.names=F, col.names=F)
27 write.table(as.double(params$piInit), paste(testFolder,"piInit",sep=""),
28 row.names=F, col.names=F)
29 write.table(as.double(params$gamInit), paste(testFolder,"gamInit",sep=""),
30 row.names=F, col.names=F)
31 write.table(as.integer(mini), paste(testFolder,"mini",sep=""),
32 row.names=F, col.names=F)
33 write.table(as.integer(maxi), paste(testFolder,"maxi",sep=""),
34 row.names=F, col.names=F)
35 write.table(as.double(gamma), paste(testFolder,"gamma",sep=""),
36 row.names=F, col.names=F)
37 write.table(as.double(lambda), paste(testFolder,"lambda",sep=""),
38 row.names=F, col.names=F)
39 write.table(as.double(xy$X), paste(testFolder,"X",sep=""),
40 row.names=F, col.names=F)
41 write.table(as.double(xy$Y), paste(testFolder,"Y",sep=""),
42 row.names=F, col.names=F)
43 write.table(as.double(seuil), paste(testFolder,"seuil",sep=""),
44 row.names=F, col.names=F)
45 write.table(as.double(tau), paste(testFolder,"tau",sep=""),
46 row.names=F, col.names=F)
47 write.table(as.double(A1), paste(testFolder,"A1",sep=""),
48 row.names=F, col.names=F)
49 write.table(as.double(A2), paste(testFolder,"A2",sep=""),
50 row.names=F, col.names=F)
51 write.table(as.integer(c(n,p,m,k,L)), paste(testFolder,"dimensions",sep=""),
52 row.names=F, col.names=F)
54 res = constructionModelesLassoMLE(
55 params$phiInit,params$rhoInit,params$piInit,params$gamInit,
56 mini,maxi,gamma,glambda,xy$X,xy$Y,seuil,tau,A1,A2)
59 write.table(as.double(res$phi), paste(testFolder,"phi",sep=""), row.names=F, col.names=F)
60 write.table(as.double(res$rho), paste(testFolder,"rho",sep=""), row.names=F, col.names=F)
61 write.table(as.double(res$pi), paste(testFolder,"pi",sep=""), row.names=F, col.names=F)
62 write.table(as.double(res$llh), paste(testFolder,"llh",sep=""), row.names=F, col.names=F)