New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem of computing GIC #267
Comments
Thanks for your question. Two points:
|
Hi~The code is readable now. But I am not clear how you get this line in R: |
Thanks for your reply. Please add the following code and then can gain |
Thanks. The following code gives results the same GIC from the abess packages. set.seed(2)
p = 250
N = 2500
X = matrix(rnorm(N * p), ncol = p)
A = sort(sample(p, 10))
beta = rep(0, p)
beta = replace(beta, A, rnorm(10, mean = 6))
xbeta <- X %*% beta
Y <- xbeta + rnorm(N)
library(abess)
C = abess(X, Y, family = "gaussian", tune.path="sequence",tune.type = "gic")
k = C$best.size
mid=coef(abess(X, Y, family = "gaussian",support.size =k))
extract(C, support.size = k)[["tune.value"]]
C$tune.value[11]
#compute GIC[10]=131.3686
Central =mid[2:(p+1)]
intercept=mid[1]
GIC= N*log(1/(N)*t(Y-X%*%Central-intercept)%*%(Y-X%*%Central-intercept))+k*log(p)*(log(log(N)))
GIC In summary, when we compute GIC, we omit a constant term (1/2) in loss function. It seems like a bug because it is not completely match to the GIC our PNAS paper (https://www.pnas.org/content/117/52/33117). We will fix this as fast as we can. But we believe this constant term is not essential, and we still can achieves desirable results in many numerical study. So, you can trust the results given by the abess. All in all, thanks for your careful code inspection, we are very appreciated. |
Thank you for your patience. |
@Jiang-Kangkang , I would like to fix this bug. But I am not very sure that just modify |
Hi, @yannstory It takes some time for us to fix this. Now, the following code returns the same GIC defined in our PNAS paper (https://www.pnas.org/content/117/52/33117). set.seed(2)
p = 250
N = 2500
X = matrix(rnorm(N * p), ncol = p)
A = sort(sample(p, 10))
beta = rep(0, p)
beta = replace(beta, A, rnorm(10, mean = 6))
xbeta <- X %*% beta
Y <- xbeta + rnorm(N)
library(abess)
C = abess(X, Y, family = "gaussian", tune.path="sequence",tune.type = "gic")
k = C$best.size
mid=coef(abess(X, Y, family = "gaussian",support.size =k))
extract(C, support.size = k)[["tune.value"]]
C$tune.value[11]
#compute GIC[10]=131.3686
Central =mid[2:(p+1)]
intercept=mid[1]
GIC= N*log(1/(2*N)*t(Y-X%*%Central-intercept)%*%(Y-X%*%Central-intercept))+k*log(p)*(log(log(N)))
GIC Notice that you need to install the latest package from our github repository:
If you meet any additional question, please feel free to contact us. |
|
I want to compute GIC to select the true model. But I gain different results from the abess packages and manual calculation.
Compute the estimator by abess packages.
The text was updated successfully, but these errors were encountered: