aknandi / disaggregation

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

Predict changes #16

Closed timcdlucas closed 5 years ago

timcdlucas commented 5 years ago

Make some changes to predictions.

Make the default be to predict from the data that is saved in the fitted model object (this is a standard). Add a newdata argument that lets you predict over an arbitrary set of covariate rasters. Add the original data to the fitted model object. In particular this keeps the mesh with the model (the model is useful without the mesh if there is a field).

Few other small things. Add tests.

codecov-io commented 5 years ago

Codecov Report

Merging #16 into master will decrease coverage by 1.52%. The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #16      +/-   ##
==========================================
- Coverage   97.87%   96.35%   -1.53%     
==========================================
  Files          10       10              
  Lines         424      466      +42     
==========================================
+ Hits          415      449      +34     
- Misses          9       17       +8
Impacted Files Coverage Δ
R/summary.R 100% <100%> (ø) :arrow_up:
R/plotting.R 100% <100%> (ø) :arrow_up:
R/prepare_data.R 96.22% <100%> (+0.22%) :arrow_up:
R/fit_model.R 100% <100%> (ø) :arrow_up:
R/predict.R 90.69% <83.33%> (-9.31%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 30f67eb...582c563. Read the comment docs.