4 generateRunSaveTest_EMGrank = function(n=200, p=15, m=10, k=3, mini=5, maxi=10, gamma=1.0, rank = c(1,2,4))
8 Rho = array(dim=c(m,m,k))
11 xy = generateXYdefault(n, p, m, k)
13 testFolder = "./data/"
14 dir.create(testFolder, showWarnings=FALSE, mode="0755")
16 write.table(as.double(Pi), paste(testFolder,"Pi",sep=""),
17 row.names=F, col.names=F)
18 write.table(as.double(Rho), paste(testFolder,"Rho",sep=""),
19 row.names=F, col.names=F)
20 write.table(as.integer(mini), paste(testFolder,"mini",sep=""),
21 row.names=F, col.names=F)
22 write.table(as.integer(maxi), paste(testFolder,"maxi",sep=""),
23 row.names=F, col.names=F)
24 write.table(as.double(xy$X), paste(testFolder,"X",sep=""),
25 row.names=F, col.names=F)
26 write.table(as.double(xy$Y), paste(testFolder,"Y",sep=""),
27 row.names=F, col.names=F)
28 write.table(as.double(eps), paste(testFolder,"eps",sep=""),
29 row.names=F, col.names=F)
30 write.table(as.integer(rank), paste(testFolder,"rank",sep=""),
31 row.names=F, col.names=F)
32 write.table(as.integer(c(n,p,m,k)), paste(testFolder,"dimensions",sep=""),
33 row.names=F, col.names=F)
35 res = valse::EMGrank(Pi,Rho,mini,maxi,xy$X,xy$Y,eps,rank,fast=FALSE)
38 write.table(as.double(res$phi),paste(testFolder,"phi",sep=""),row.names=F,col.names=F)
39 write.table(as.double(res$LLF),paste(testFolder,"LLF",sep=""),row.names=F,col.names=F)