ProjectionBestModel: Optimising the projections using the evaluation scores

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Selects the best model per species within Biomod according to its predictive performance evaluated by Roc, Kappa and/or TSS.

Usage

1
ProjectionBestModel(Proj.name, Bin.trans = TRUE, Filt.trans = TRUE, method='all')

Arguments

Proj.name

The name of your projection dataset. Note that the Projection() function has therefore to have run on this particular data. It is needed to load back the projections in probabilities from the appropriate directory.

Bin.trans

type True to have the projections also converted into binary values

Filt.trans

type True to have the projections also converted into filtered values

method

the evaluation method you want to use, can be 'Roc', 'Kappa', 'TSS' or 'all'. If 'all' is selected, then the best model will be chosen independently for each evaluation method

Details

The Proj.name is dependent of the one already given in Projection. It will be used to restore some data in the correspondant directory.

Value

No values are returned but objects are produced in the appropriate folder (see Projection for details). Example of ProjBestModelByKappa (but all follow the same logic) : a matrix with a column per species containing the projections in probabilities using the Kappa scores to select the best model. The projections can also be obtained in binary and filtered values (additionnal matrices are thus produced).

Author(s)

Wilfried Thuiller, Bruno Lafourcade

References

Thuiller, W. 2003 BIOMOD: Optimising predictions of species distributions and projecting potential future shifts under global change. Global Change Biology 9, 1353-1362.

See Also

Models, Projection, PredictionBestModel

Examples

 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
33
34
35
36
37
38
39
40
## Not run: 
data(Sp.Env)

#This command is necessary for the run of BIOMOD as a new dataframe is produced for the Models function
Initial.State(Response=Sp.Env[,12:13], Explanatory=Sp.Env[,4:10], 
IndependentResponse=NULL, IndependentExplanatory=NULL)

#Here are done 2 PA runs and 2 repetitions for each run. Here we will have 12 runs per species. This will hence take several minutes.
Models(GLM = TRUE, TypeGLM = "quad", Test = "AIC", CTA = TRUE, CV.tree = 50, RF = TRUE, CV.ann = 2, 
   NbRunEval = 2, DataSplit = 80, Roc=TRUE, Optimized.Threshold.Roc=TRUE, Kappa=TRUE, TSS=TRUE, VarImport=5,
   NbRepPA=2, strategy="sre", coor=NULL, distance=0, nb.absences=1000)


#Render Future projections under climate change scenario
data(Future1)
Projection( Proj = Future1[,4:10], Proj.name="Future1", GLM=TRUE, CTA=TRUE, RF=TRUE, BinKappa=TRUE, FiltKappa=TRUE)


#This function needs to be run before hand in order to produce the reference files for ProjectionBestModel
PredictionBestModel(method='all', Bin.trans = TRUE, Filt.trans = TRUE)

#Determine the best projection according to each evaluation method
ProjectionBestModel(Proj.name="Future1", method='all', Bin.trans = TRUE, Filt.trans = TRUE)

#visualise the objects produced, example for TSS
load("pred/BestModelByTSS")
BestModelByTSS

#In contrast with PredictionBestModel(), the results are stored in one array per method with
#the third dimension being the number of species modelled.

load("proj.Future1/Proj_Future1_BestModelByTSS_Bin")
dim(Proj_Future1_BestModelByTSS_Bin)
dimnames(Proj_Future1_BestModelByTSS_Bin)[-1]
Proj_Future1_BestModelByTSS_Bin[1:10,,]

load("proj.Future1/Proj_Future1_BestModelByTSS_Filt")
Proj_Future1_BestModelByTSS_Filt[1:10,,]

## End(Not run)

BIOMOD documentation built on May 2, 2019, 6:48 p.m.