[R-sig-Geo] Reproducibility of results from predict() function - raster package
Katherine Ransom
lockhart.katherine at gmail.com
Fri Oct 28 20:30:02 CEST 2016
Hi Chris,
Thank you.
I have tried that (should have mentioned it) and I just tried it again.
However, it did not help. Also, I just tried summing the raster values in R
rather than looking at summary stats in ArcGIS and they are still not the
same.
Any other ideas?
On Fri, Oct 28, 2016 at 7:54 AM, chris english <
englishchristophera at gmail.com> wrote:
> Katie,
>
> set.seed(123) on each run thru will (should) result in reproducibility.
>
> set.seed(1234)
> pred <- predict(
>
> Chr
>
> On Oct 27, 2016 7:19 PM, "Katherine Ransom" <lockhart.katherine at gmail.com>
> wrote:
> >
> > 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]]
> >
> > _______________________________________________
> > R-sig-Geo mailing list
> > R-sig-Geo at r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>
--
--
Katherine Ransom
PhD Candidate
Hydrologic Sciences Graduate Group
UC Davis
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list