We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b21260a commit 183bc3aCopy full SHA for 183bc3a
selectiveInference/R/funs.randomized.R
@@ -98,8 +98,8 @@ randomizedLasso = function(X,
98
observed_unpen = result$soln[unpenalized]
99
observed_subgrad = -n*result$gradient[inactive]
100
101
- if (length(which(abs(observed_subgrad)>lam[1]))){
102
- print("subgradient eq not satisfied")
+ if (sum(abs(observed_subgrad)>lam*(1.001)) > 0){
+ stop("subgradient eq not satisfied")
103
}
104
105
observed_opt_state = c(observed_unpen, observed_scalings, observed_subgrad)
0 commit comments