From: emilie Date: Fri, 21 Apr 2017 14:24:06 +0000 (+0200) Subject: ... X-Git-Url: https://git.auder.net/css/vendor/img/cross.svg?a=commitdiff_plain;h=43f9cdc196c73bf1074924d4921445d63e89a2f4;p=valse.git ... --- 43f9cdc196c73bf1074924d4921445d63e89a2f4 diff --cc pkg/R/constructionModelesLassoMLE.R index 0197e1a,78e11ad..16f58b6 --- a/pkg/R/constructionModelesLassoMLE.R +++ b/pkg/R/constructionModelesLassoMLE.R @@@ -80,18 -80,7 +80,7 @@@ constructionModelesLassoMLE <- function norm_fact <- sum(gam) sumLogLLH <- sumLogLLH + log(norm_fact) - log((2 * base::pi)^(m/2)) } - llhLambda <- c(sumLogLLH/n, (dimension + m + 1) * k - 1) + llhLambda <- c(-sumLogLLH/n, (dimension + m + 1) * k - 1) - # densite <- vector("double", n) - # for (r in 1:k) - # { - # if (length(col.sel) == 1) - # { - # delta <- (Y %*% rhoLambda[, , r] - (X[, col.sel] %*% t(phiLambda[col.sel, , r]))) - # } else delta <- (Y %*% rhoLambda[, , r] - (X[, col.sel] %*% phiLambda[col.sel, , r])) - # densite <- densite + piLambda[r] * det(rhoLambda[, , r])/(sqrt(2 * base::pi))^m * - # exp(-rowSums(delta^2)/2) - # } - # llhLambda <- c(mean(log(densite)), (dimension + m + 1) * k - 1) list(phi = phiLambda, rho = rhoLambda, pi = piLambda, llh = llhLambda) }