Description Usage Arguments Details Value Author(s) See Also Examples
This function enables to create binary and/or filtered datasets from the probability data and the thresholds produced by the Models() function of Biomod for current data.
1 2 |
GLM |
type True or False to produce binary and/or filtered prediction data for that model |
GAM |
type True or False to produce binary and/or filtered prediction data for that model |
GBM |
type True or False to produce binary and/or filtered prediction data for that model |
CTA |
type True or False to produce binary and/or filtered prediction data for that model |
RF |
type True or False to produce binary and/or filtered prediction data for that model |
FDA |
type True or False to produce binary and/or filtered prediction data for that model |
SRE |
type True or False to produce binary and/or filtered prediction data for that model |
MARS |
type True or False to produce binary and/or filtered prediction data for that model |
ANN |
type True or False to produce binary and/or filtered prediction data for that model |
BinRoc |
set to True if you want the predictions converted from probabilities to binary data using Roc |
BinKappa |
set to True if you want the predictions converted from probabilities to binary data using Kappa |
BinTSS |
set to True if you want the predictions converted from probabilities to binary data using TSS |
FiltRoc |
set to True if you want the predictions converted from probabilities to filtered data using Roc |
FiltKappa |
set to True if you want the predictions converted from probabilities to filtered data using Kappa |
FiltTSS |
set to True if you want the predictions converted from probabilities to filtered data using TSS |
The thresholds used are those stored in the Evaluation.results.Roc/Kappa/TSS objects produced by the Models() function. As a general reminder, do think about reloading these objects stored in the .RData file also produced by the Models() function from one R session to another .
No values are returned but a series of objects are produced in the "pred" folder (see Models
for further details).
Like for the predictions, the files are arrays of 4 diensions and produced per species. They contain the predictions in binary or
filtered predictions data. See the structure in the examples below.
Wilfried Thuiller, Bruno Lafourcade
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ## Not run:
data(Sp.Env)
data(CoorXY)
#This command is necessary for the run of BIOMOD as a new dataframe is produced for the Models function
Initial.State(Response=Sp.Env$Sp277, Explanatory=Sp.Env[,4:10], sp.name='Sp277',
IndependentResponse=NULL, IndependentExplanatory=NULL)
#Here are done a Full Calib. This will hence take several minutes.
Models(RF=TRUE, SRE=TRUE, GLM = FALSE, TypeGLM = "quad", Test = "AIC", CTA = FALSE, CV.tree = 50, ANN = FALSE, CV.ann = 2,
NbRunEval = 1, DataSplit = 100, Roc=TRUE, Optimized.Threshold.Roc=TRUE, Kappa=TRUE, TSS=TRUE, VarImport=5,
NbRepPA=0, strategy="circles", coor=CoorXY, distance=2, nb.absences=1000)
#The results of the Models() function are in probabilities (scaled between 0 to 1000). The CurrentPred() function
#enables to produce binary or filtered results. Here we decide to create binary data using the Roc and TSS thresholds,
#and filtered data using only the TSS threshold.
CurrentPred(BinRoc=TRUE, BinKappa=FALSE, BinTSS=TRUE, FiltRoc=FALSE, FiltKappa=FALSE, FiltTSS=TRUE)
#let's view some examples of them
load("pred/Pred_Sp277_BinRoc")
dim(Pred_Sp277_BinRoc)
dimnames(Pred_Sp277_BinRoc)[-1]
Pred_Sp277_BinRoc[120:140,,1,1]
load("pred/Pred_Sp277_FiltTSS")
Pred_Sp277_FiltTSS[120:140,,1,1]
level.plot(Pred_Sp277_FiltTSS[,"RF",1,1], CoorXY, show.scale=FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.