jsocolar / flocker

flexible occupancy estimation in R
Other
26 stars 2 forks source link

post-processing functions work for all model types #63

Closed jsocolar closed 1 year ago

jsocolar commented 1 year ago
jsocolar commented 1 year ago

We're rollin'. I just pushed a (totally untested and likely buggy) version of get_Z on the post-processing branch, which branches off of the more-models branch. This new version (if it works), provides get_Z for all dynamic and fp model types (still no augmented however). Once I verify that it's working properly, I think this should already enable predict_flocker to work on these types. And I think log_lik won't be far behind. So we're surprisingly close to getting this in!

jsocolar commented 1 year ago

I've done some informal testing, found a bunch of bugs, and fixed them. Still need to test this formally with unit tests and also to test as a component of an SBC workflow, but I think that get_Z and predict_flocker now work on all multiseason types on the post-processing branch. Thus, closing out this task is now a matter of getting log_lik up and running, and also dealing with the augmented model type.

jsocolar commented 1 year ago

I'm cruising! log_lik and therefore loo now work on all multiseason types! All that remains is to get them working on the augmented model, and to verify that they are working correctly. They unfortunately are not wildly fast on the multiseason types... but that's for another day.

jsocolar commented 1 year ago

get_Z and predict_flocker now work on the augmented types.

jsocolar commented 1 year ago

Right, log_lik now works for augmented types, though it's expected not to be very effective since it's leave-one-species-out with random effects of species, so pareto k is going to be a disaster. The longer-term solution will be to provide an option to compute the log likelihoods while marginalizing over the latents.

jsocolar commented 1 year ago

Gonna close and make a new issue about options for marginalizing over latents.