I am having some issues with the predict function that I'm not sure are a bug or me doing something wrong.
I ran a model in a cluster, saved the result of bart.step() as an RDS file, and then opened it locally. Everything seems good, this is how the loaded object looks:
> class(calbor.sdm)
[1] "bart"
> summary(calbor.sdm)
Call: bart all.cov[, step.model] all.cov[, "pres"] TRUE
Predictor list:
bati chla_var logchla_lag3 sal sst sst_grad
Area under the receiver-operator curve
AUC = 0.8937647
Recommended threshold (maximizes true skill statistic)
Cutoff = 0.519118
TSS = 0.6287537
Resulting type I error rate: 0.16072
Resulting type II error rate: 0.2105263
which I don't hate, and the plot looks like this
However, when I try to predict using
CB_prediction <- embarcadero::predict2.bart(object = calbor.sdm2, #make sure I'm getting embarcadero's predict
x.layers = predictors_original,
quantiles =c(0.025, 0.975),
# splitby = 20, #Doesn't work with or without this
quiet = F)
I get a stack of rasters with all cells == 0.5, see:
I've tried tweaking the options of the predict function, but nothing seemed to work.
The cluster (where I ran the model) works with R version 3.6, while I'm running in my laptop Windows x64 (where I'm predicting and plotting) R version 4.1.1.
I am having some issues with the predict function that I'm not sure are a bug or me doing something wrong.
I ran a model in a cluster, saved the result of
bart.step()
as an RDS file, and then opened it locally. Everything seems good, this is how the loaded object looks:which I don't hate, and the plot looks like this
However, when I try to predict using
I get a stack of rasters with all cells == 0.5, see:
that looks like this
I've tried tweaking the options of the predict function, but nothing seemed to work.
The cluster (where I ran the model) works with R version 3.6, while I'm running in my laptop Windows x64 (where I'm predicting and plotting) R version 4.1.1.
Thanks for the help!