View source: R/create_training_data.R
sample_negative_points | R Documentation |
randomly sample points from an analysis area to create a dataset of negative points given a set of positive points
sample_negative_points(
positive_points,
analysis_region,
buffer = TRUE,
buffer_radius = 15,
negative_proportion = 1,
rseed = NULL
)
positive_points |
SpatVector with locations of all points with positive class |
analysis_region |
SpatRaster with data values everywhere that points can be sampled from. All locations that should be excluded from sampling should be NA. If NULL, all cells which contain data for all layers of the predictors_raster will be used. |
buffer |
Return buffer around points? |
buffer_radius |
minimum possible distance between a positive and negative point |
negative_proportion |
Proportion of negative points to be generated compared to number of positive points |
rseed |
Optional integer to seed the random sampling. This allows exact "random" results to be reproduced multiple times. If no number is given, a random number will be chosen as a seed. |
SpatVector with positive and negative points, with a field
"class"
indicating whether each point is positive or negative
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.