View source: R/trainControlSDM.R
| trainControlSDM | R Documentation |
Similar to the caret::trainControl, but with additional options
trainControlSDM( method = "boot", number = 10, repeats = NA, p = 0.75, y = NULL, spatial.folds = NULL, presence.only = FALSE, classProbs = TRUE, summaryFunction = twoClassSDM, ... )
method |
one of 'cv', 'repeatedcv', 'boot', 'lgocv', 'none', 'adaptive_cv', 'adaptive_boot' and 'adaptive_lgocv' |
number, repeats, p |
Same as in |
y |
Response variable. Only used if |
spatial.folds |
A vector or factor of fold designation. Must be same order as y, if supplield. |
presence.only |
If |
classProbs, summaryFunction |
Same as in |
... |
Other parameters passed to |
This function has two more keys arguments compared to caret::trainControl:
'spatial.folds' and 'presence.only'.
When spatial.folds is specified, the sampling (as defined by method) is applied in all folds, except one.
This fold is used as held-out is the model and the process is repeated for each fold.
When presence.only is set to TRUE, than the sampling is done only in the presence data,
and all absence records are used in each replicate.
This should be set to TRUE when using presence/background data.
A trainControl object to be used in the 'train' function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.