Skip to content

Commit e739255

Browse files
author
Jelena Markovic
committed
active set zero
1 parent e2efbdc commit e739255

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/randomized/test_instances.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ test_KKT=function(){
6363

6464
collect_results = function(n,p,s, nsim=100, level=0.9, condition_subgrad=TRUE, lam=1.2){
6565

66-
rho=0.
66+
rho=0.3
6767
sigma=1
6868
sample_pvalues = c()
6969
sample_coverage = c()
@@ -80,9 +80,9 @@ collect_results = function(n,p,s, nsim=100, level=0.9, condition_subgrad=TRUE, l
8080
burnin=1000,
8181
nsample=5000,
8282
condition_subgrad=condition_subgrad)
83-
true_beta = beta[result$active_set]
84-
coverage = rep(0, nrow(result$ci))
8583
if (length(result$active_set)>0){
84+
true_beta = beta[result$active_set]
85+
coverage = rep(0, nrow(result$ci))
8686
for (i in 1:nrow(result$ci)){
8787
if (result$ci[i,1]<true_beta[i] & result$ci[i,2]>true_beta[i]){
8888
coverage[i]=1
@@ -104,7 +104,7 @@ collect_results = function(n,p,s, nsim=100, level=0.9, condition_subgrad=TRUE, l
104104
}
105105

106106
set.seed(1)
107-
collect_results(n=100, p=2000, s=0, lam=3)
107+
collect_results(n=100, p=2000, s=0, lam=2.5)
108108
#test_randomized_lasso()
109109
#test_KKT()
110110

0 commit comments

Comments
 (0)