few modifications
authoremilie <emilie@devijver.org>
Fri, 17 Mar 2017 12:15:22 +0000 (13:15 +0100)
committeremilie <emilie@devijver.org>
Fri, 17 Mar 2017 12:15:22 +0000 (13:15 +0100)
pkg/R/valse.R
reports/essaiPlot.R

index 396a9a1..72e2d4d 100644 (file)
@@ -45,9 +45,9 @@ valse = function(X,Y,procedure = 'LassoMLE',selecMod = 'DDSE',gamma = 1,mini = 1
     source('~/valse/pkg/R/gridLambda.R')
     grid_lambda <<- gridLambda(phiInit, rhoInit, piInit, gamInit, X, Y, gamma, mini, maxi, eps)
     
-    if (length(grid_lambda)>50){
-      grid_lambda = grid_lambda[seq(1, length(grid_lambda), length.out = 50)]
-    }
+    if (length(grid_lambda)>50){
+      grid_lambda = grid_lambda[seq(1, length(grid_lambda), length.out = 50)]
+    }
     print("Compute relevant parameters")
     #select variables according to each regularization parameter
     #from the grid: A1 corresponding to selected variables, and
index dea7e00..bf2b61e 100644 (file)
@@ -18,7 +18,7 @@ kSel = c(1,2)
 par(mfrow = c(1,3))
 
 for (r in kSel){
-  image.plot(t(abs(model$phi[,,r])),title="hat{beta}",xaxt="n",yaxt="n", 
+  image.plot(t(abs(model$phi[,,r])),xaxt="n",yaxt="n", 
              col=gray(rev(seq(0,64,length.out=65))/65),breaks=seq(0,valMax,length.out=66))
 }
 image.plot(t(abs(model$phi[,,kSel[1]]-model$phi[,,kSel[2]])),