Use environmental clustering to separate train and test folds
Use environmental clustering to separate train and test folds
This function is deprecated and will be removed in future updates! Please use cv_cluster instead!
envBlock( rasterLayer, speciesData, species =NULL, k =5, standardization ="normal", rasterBlock =TRUE, sampleNumber =10000, biomod2Format =TRUE, numLimit =0, verbose =TRUE)
Arguments
rasterLayer: A raster object of covariates to identify environmental groups.
speciesData: A simple features (sf) or SpatialPoints object containing species data (response variable).
species: Character. Indicating the name of the field in which species data (binary response i.e. 0 and 1) is stored. If speceis = NULL
the presence and absence data (response variable) will be treated the same and only training and testing records will be counted. This can be used for multi-class responses such as land cover classes for remote sensing image classification, but it is not necessary. Do not use this argument when the response variable is continuous or count data.
k: Integer value. The number of desired folds for cross-validation. The default is k = 5.
standardization: Standardize input raster layers. Three possible inputs are "normal" (the default), "standard" and "none". See details for more information.
rasterBlock: Logical. If TRUE, the clustering is done in the raster layer rather than species data. See details for more information.
sampleNumber: Integer. The number of samples from raster layers to build the clusters.
biomod2Format: Logical. Creates a matrix of folds that can be directly used in the biomod2 package as a DataSplitTable for cross-validation.
numLimit: Integer value. The minimum number of points in each category of data (train_0, train_1, test_0 and test_1). Shows a message if the number of points in any of the folds happens to be less than this number.
verbose: Logical. To print the report of the recods per fold.