Z[i] = 0
}
return (list(Z=Z,indice=indice))
-}
\ No newline at end of file
+}
delimiter = " "
#save inputs
- params = basicInitParameters(n, p, m, k)
+ require(valse)
+ params = valse:::basic_Init_Parameters(n, p, m, k)
io = generateIOdefault(n, p, m, k)
write.table(paste(testFolder,"phiInit",sep=""), params$phiInit, sep=delimiter);
write.table(paste(testFolder,"rhoInit",sep=""), params$rhoInit, sep=delimiter);
}
#Generate X and Y
- generateIOdef = generateIOdefault(n, p, m, k)
+ require(valse)
+ generateIOdef = valse:::generateIOdefault(n, p, m, k)
#save inputs
write.table(paste(testFolder,"rho",sep=""), rho, sep=delimiter)
delimiter = " "
#Generate phiInit,piInit,...
- params = basicInitParameters(n, p, m, k)
+ require(valse)
+ params = valse:::basic_Init_Parameters(n, p, m, k)
#save inputs
write.table(paste(testFolder,"phiInit",sep=""), params$phiInit, sep=delimiter)
}
}
#Generate X and Y
- generateIOdef = generateIOdefault(n, p, m, k)
+ require(valse)
+ generateIOdef = valse:::generateIOdefault(n, p, m, k)
A1 = matrix(0,p,L)
for(i in 1:L){
write.table(paste(testFolder,"phi",sep=""), construct$phi, sep=delimiter)
write.table(paste(testFolder,"lvraisemblance",sep=""), construct$lvraisemblance, sep=delimiter)
-}
\ No newline at end of file
+}
dir.create(testFolder, showWarnings=FALSE, mode="0755")
delimiter = " "
+ require(valse)
+
#Generate phiInit,piInit,...
- params = basicInitParameters(n, p, m, k)
+ params = valse:::basic_Init_Parameters(n, p, m, k)
#Generate X and Y
- generateIOdef = generateIOdefault(n, p, m, k)
+ generateIOdef = valse:::generateIOdefault(n, p, m, k)
#save inputs
write.table(paste(testFolder,"phiInit",sep=""), params$phiInit, sep=delimiter)
-source("/home/goehry/Documents/valse/valse/R/vec_bin.R")
require(MASS)
EMGrank = function(Pi, Rho, mini, maxi, X, Y, tau, rank){
#matrix dimensions
while(ite<=mini || (ite<=maxi && sumDeltaPhi>tau)){
#M step: Mise à jour de Beta (et donc phi)
for(r in 1:k){
- Z_bin = vec_bin(Z,r)
+ Z_bin = valse:::vec_bin(Z,r)
Z_vec = Z_bin$vec #vecteur 0 et 1 aux endroits o? Z==r
Z_indice = Z_bin$indice
if(sum(Z_indice) == 0){
}
return(list(phi=phi, LLF=LLF))
-}
\ No newline at end of file
+}
deltaRank = rangmax - rangmin + 1
Size = deltaRank^k
Rank = matrix(0, Size, k)
- for(r in 1:k){
- Rank[,r] = rangmin +
- }
+# for(r in 1:k) {
+# Rank[,r] = rangmin + <--- #FIXME:
+# }
phi = array(0, dim=c(p,m,k,L*Size))
lvraisemblance = matrix(0, L*Size, 2)
}
}
return(list(phi=phi, lvraisemblance = lvraisemblance))
-}
\ No newline at end of file
+}