aknandi / disaggregation

R package containing methods for Bayesian disaggregation modelling
Other
21 stars 6 forks source link

Thinking out loud about predict #12

Closed timcdlucas closed 4 years ago

timcdlucas commented 4 years ago

Currently predict takes a disag.data object. I guess a lot of the time that's what we want. But I can also image just wanting to do predict on a stack of covariate rasters. Or even a dataframe of covariates.

So I think I'll aim to make predict_data be able to handle either a raster stack or a disag.data object. Part of that will be making the fit_model function return the mesh. But i think that's a sensible thing to do anyway as it's an integral part of the model.

Small thing of style is that most predict functions take the model object first. I think we should swap the argument order.

I know I'm opening a lot of issues without actually fixing anything. I'll slowly get round to fixing some of them unless you jump in and tell me my ideas are wrong.

timcdlucas commented 4 years ago

Think this is all done as of 02e2866e41d1c4aba70a71878e56241b467dc656

I need to write tests.