train_val | R Documentation |
Splits data into training and validation samples. Uses stratified random sampling without replacement. Will randomly draw the specified proportion without replacement from each class to generate validation data. Training set is the original data with the observations from validation data removed. Returns a list containing training data as the first element and validation data as the second element. The list elements will be the same data type as the input of my_data
train_val(my_data, hab_col, prop_val, seed = NULL)
my_data |
a spatialpoints dataframe containing, dataframe, or tibble containing all data |
hab_col |
number specifying the column to check |
prop_val |
proportion of samples to be used in validation |
seed |
sampling is initiated by set.seed(seed) if input is not NULL. This will generate consistent results |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.