Question about distribution of `beta_hat` values
Opened this issue · 3 comments
Hi @mkomod! Great work with this package!
I was trying to understand what exactly is the posterior distribution that the beta_hat
values follow? There is an equation below Eg. (6) in the paper that relates to that I think. I see that beta_hat
are the mean under the variational approximation (γ*μ) and there is an output s (sigma => stadard deviation) - maybe they follow a Gaussian with mean beta_hat
and sd = γ*s? Then what about the δ_0 dirac term I see in the formula? The idea is to be able to make a credible interval for the beta_hat
's or draw from the posterior distribution.
John
Hi John,
Thanks for your question. The distribution of
for
With respect to
If however, you'd like to quantify the uncertainty about some value of interest e.g.
svb.sample <- function(fit, samples=1e4)
{
p <- length(fit$g)
beta <- replicate(samples,
{
j <- runif(p) <= fit$g
b <- rep(0, p)
if (sum(j) == 0)
return(b)
m <- rnorm(sum(j), fit$mu[j], fit$s[j])
b[j] <- m
return(b)
}, simplify="matrix")
return(beta)
}
Please let me know if more clarification is needed?
Michael
p.s. From a recent project, I recommend orthogonalizing the design matrix in some way. This improves the stability of the algorithm. I'll dig up some code for this if needed?
Hi @mkomod,
Thanks for answering this!
I am coming from the ML side of things, so I would encourage to make also a predict(fit, newdata, ...)
function, where users will have the option to supply new X
data (test set) and get the predicted risk scores
This will make it easier to wrap your method in the mlr3 framework and be used by others. I am currently trying to include more Bayesian survival models, like survival BART for example. Maybe with a little bit of help from you, we can include survival.svb
as well!