[R-sig-Geo] Reproducibility of results from predict() function - raster package
Katherine Ransom
lockhart.katherine at gmail.com
Fri Oct 28 01:19:02 CEST 2016
Hi All,
I am having trouble reproducing my results exactly when I make predictions
with predict() and a saved gbm model object. Each time I run predict() with
the same model object and inputs (a raster stack), I get slightly different
values (max value within 0.7 for a range of predictions from 0.08 to 12.30
for example). However, there seems to be a limited amount of outcomes. For
example, I can get the results to reproduce if I run predict enough times.
The issue seems to be within the predict() function as it doesn't seem to
be related to R session, loading package libraries, etc.
Are there any random number generators or known bugs within the predict
function that could be causing this behavior?
Here is my code line that calls predict: pred <- predict(rstack, final,
n.trees=final$n.trees,na.rm=TRUE,const=data.frame(WaterUse2="H")) #
family="gaussian"
Not sure if I need the family = "gaussian" option. It doesn't seem to
affect the results.
Thank you,
Katie
--
--
Katherine Ransom
PhD Candidate
Hydrologic Sciences Graduate Group
UC Davis
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list