stan4bart icon indicating copy to clipboard operation
stan4bart copied to clipboard

Feature Request: predict specific chains/iterations

Open Pentaonia opened this issue 1 year ago • 0 comments

Hi @vdorie,

In my process, I noticed that the predict function predicts my new data for every chain and every iteration - the burn-in. Wouldn't it be nice and much faster to be able to directly address a specific chain/all chains and maybe the last 200 iterations (or something else) that should be predicted?

Something like this:

model: chains = 6, iterations-burnin = 2500

predict.stan4bartFit(
        object = model,
        newdata = newdata_df,
        type = "ev",
        combine_chains = FALSE,
        pred_chains = c(2, 4, 6),
        pred_iter = 2300:2500
)

As I am quite busy at the moment, I am not able to look at your code and I don't know how "simple" can be realized, but from my "outside view" it might not be that difficult. Might it be "just" an implementation of how many iterations/chains are extracted from the model object and handled in the function!?

All the best Louis

Pentaonia avatar Jun 15 '23 10:06 Pentaonia