From f7ac8e154ed78624db1a9992adb5576cae499989 Mon Sep 17 00:00:00 2001 From: emilie Date: Fri, 21 Apr 2017 16:56:37 +0200 Subject: [PATCH] still some problems with LLF --- pkg/R/main.R | 15 ++++++++++++--- pkg/data/script_data.R | 4 ++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/pkg/R/main.R b/pkg/R/main.R index 0a3487b..632d90b 100644 --- a/pkg/R/main.R +++ b/pkg/R/main.R @@ -127,10 +127,19 @@ valse <- function(X, Y, procedure = "LassoMLE", selecMod = "DDSE", gamma = 1, mi print(tableauRecap) modSel <- capushe::capushe(tableauRecap, n) indModSel <- if (selecMod == "DDSE") - as.numeric(modSel@DDSE@model) else if (selecMod == "Djump") - as.numeric(modSel@Djump@model) else if (selecMod == "BIC") - modSel@BIC_capushe$model else if (selecMod == "AIC") + { + as.numeric(modSel@DDSE@model) + } else if (selecMod == "Djump") + { + as.numeric(modSel@Djump@model) + } else if (selecMod == "BIC") + { + modSel@BIC_capushe$model + } else if (selecMod == "AIC") + { modSel@AIC_capushe$model + } + mod <- as.character(tableauRecap[indModSel, 1]) listMod <- as.integer(unlist(strsplit(mod, "[.]"))) diff --git a/pkg/data/script_data.R b/pkg/data/script_data.R index 6b90712..d425a38 100644 --- a/pkg/data/script_data.R +++ b/pkg/data/script_data.R @@ -11,5 +11,5 @@ Beta[1:4,1:4,2] = -2*diag(4) #Data = generateXY(100, c(0.5,0.5), rep(0,p), Beta, diag(p), covY) -#Res = valse(Data$X,Data$Y, fast=FALSE, plot=FALSE, verbose = TRUE, kmax=2, compute_grid_lambda = FALSE, -# grid_lambda = seq(0.2,2,length = 50), size_coll_mod = 50) +#Res = valse(Data$X,Data$Y, fast=FALSE, plot=FALSE, verbose = TRUE, kmax=2, size_coll_mod = 100, +# selecMod = "BIC") -- 2.44.0