projects
/
valse.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
basic test OK, but problem with 'fast' EMGLLF output in last EMilie test
[valse.git]
/
pkg
/
R
/
EMGLLF.R
diff --git
a/pkg/R/EMGLLF.R
b/pkg/R/EMGLLF.R
index
bf4476b
..
08ff203
100644
(file)
--- a/
pkg/R/EMGLLF.R
+++ b/
pkg/R/EMGLLF.R
@@
-19,7
+19,8
@@
#' rho : parametre de variance renormalisé, calculé par l'EM
#' pi : parametre des proportions renormalisé, calculé par l'EM
#' LLF : log vraisemblance associée à cet échantillon, pour les valeurs estimées des paramètres
#' rho : parametre de variance renormalisé, calculé par l'EM
#' pi : parametre des proportions renormalisé, calculé par l'EM
#' LLF : log vraisemblance associée à cet échantillon, pour les valeurs estimées des paramètres
-#' S : ... affec : ...
+#' S : ...
+#' affec : ...
#'
#' @export
EMGLLF <- function(phiInit, rhoInit, piInit, gamInit, mini, maxi, gamma, lambda,
#'
#' @export
EMGLLF <- function(phiInit, rhoInit, piInit, gamInit, mini, maxi, gamma, lambda,
@@
-72,7
+73,6
@@
EMGLLF <- function(phiInit, rhoInit, piInit, gamInit, mini, maxi, gamma, lambda,
ps2 <- array(0, dim = c(p, m, k))
X2 <- array(0, dim = c(n, p, k))
Y2 <- array(0, dim = c(n, m, k))
ps2 <- array(0, dim = c(p, m, k))
X2 <- array(0, dim = c(n, p, k))
Y2 <- array(0, dim = c(n, m, k))
- EPS <- 1e-15
for (ite in 1:maxi)
{
for (ite in 1:maxi)
{
@@
-190,5
+190,6
@@
EMGLLF <- function(phiInit, rhoInit, piInit, gamInit, mini, maxi, gamma, lambda,
break
}
break
}
- list(phi = phi, rho = rho, pi = pi, llh = llh, S = S)
+ affec = apply(gam, 1, which.max)
+ list(phi = phi, rho = rho, pi = pi, llh = llh, S = S, affec=affec)
}
}