| bm_BinaryTransformation | R Documentation |
This internal biomod2 function allows to convert probability (not necessary
between 0 and 1) values into binary presence-absence (0 or 1) values
according to a predefined threshold (see Details).
bm_BinaryTransformation(data, threshold, do.filtering = FALSE)
## S4 method for signature 'data.frame'
bm_BinaryTransformation(data, threshold, do.filtering = FALSE)
## S4 method for signature 'matrix'
bm_BinaryTransformation(data, threshold, do.filtering = FALSE)
## S4 method for signature 'numeric'
bm_BinaryTransformation(data, threshold, do.filtering = FALSE)
## S4 method for signature 'SpatRaster'
bm_BinaryTransformation(data, threshold, do.filtering = FALSE)
data |
a |
threshold |
a |
do.filtering |
(optional, default |
If data is a vector, threshold should be a single
numeric value.
If data is a matrix, data.frame or
SpatRaster, threshold should be a
vector containing as many values as the number of columns or
layers contained in data. If only one numeric value is given,
the same threshold will be applied to all columns or layers.
If do.filtering = FALSE, binary (0 or 1) values are returned.
If do.filtering = TRUE, values will be filtered according to threshold,
meaning that :
data < threshold will return 0
data >= threshold will return the actual values of data (not
transformed in 1)
An object of the same class than data and containing either
binary (0 or 1) values, or filtered values.
Wilfried Thuiller, Damien Georges
BIOMOD_Projection, BIOMOD_EnsembleForecasting
Other Secundary functions:
bm_CrossValidation(),
bm_FindOptimStat(),
bm_MakeFormula(),
bm_ModelingOptions(),
bm_PlotEvalBoxplot(),
bm_PlotEvalMean(),
bm_PlotRangeSize(),
bm_PlotResponseCurves(),
bm_PlotVarImpBoxplot(),
bm_PseudoAbsences(),
bm_RunModelsLoop(),
bm_SRE(),
bm_SampleBinaryVector(),
bm_SampleFactorLevels(),
bm_Tuning(),
bm_VariablesImportance()
## Generate a 0-1000 vector (normal distribution)
vec.d <- rnorm(100, 500, 100)
## From continuous to binary / filtered vector
vec.d_bin <- bm_BinaryTransformation(data = vec.d, threshold = 500)
vec.d_filt <- bm_BinaryTransformation(data = vec.d, threshold = 500, do.filtering = TRUE)
cbind(vec.d, vec.d_bin, vec.d_filt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.