Title: | Sprecies Distribution Modelling with Tidymodels |
---|---|
Description: | Provides functions and classes to help create Species Distribution Models (SDMs) within the {tidymodels} framework. Provides new {parsnip} models, new {recipes} steps, and {yardstick} metrics. This package provides access to the powerful {tidymodels} ecosystem for SDMs, especially the package {spatialsample} for spatially aware cross validation and model evaluation, as well as opening up all classification models implemented in {parsnip} for presence-only SDMs, using the pseudo-absence approach. |
Authors: | Russell Dinnage [aut, cre] |
Maintainer: | Russell Dinnage <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.0.9000 |
Built: | 2024-11-20 06:23:01 UTC |
Source: | https://github.com/rdinnager/tidysdm |
Add environmental variables
add_env_vars(x, env)
add_env_vars(x, env)
env |
Make background from points
create_background( x, method = c("convex_hull", "point_buffer", "ecoregion", "concave_hull", "grid_fill", "user_fill"), buffer = 0, max_bg = NULL, grid_options = NULL, concave_options = NULL )
create_background( x, method = c("convex_hull", "point_buffer", "ecoregion", "concave_hull", "grid_fill", "user_fill"), buffer = 0, max_bg = NULL, grid_options = NULL, concave_options = NULL )
concave_options |
Generate a grid of values for making predictions
create_prediction_grid(bg, n = 10000, square = TRUE, include_polygons = FALSE)
create_prediction_grid(bg, n = 10000, square = TRUE, include_polygons = FALSE)
include_polygons |
Get Spatial Neighbours
get_spatial_neighbours( x, k = 8, maxdist = 1e+05, progress = TRUE, parallel = 1 )
get_spatial_neighbours( x, k = 8, maxdist = 1e+05, progress = TRUE, parallel = 1 )
x |
An |
k |
The number of nearest neighbours to retrieve |
maxdist |
The maximum distance to get nearest neighbours from |
progress |
Print progess bar? |
parallel |
How many parallel cores to use. |
A list of neighbour indices
Spatial Cross Validation Designed for Presence-Only Data
po_spatial_buffer_vfold_cv( data, radius = NULL, buffer = 0.1, v = 10, repeats = 1, presence = NULL, pool = 0.1, ... )
po_spatial_buffer_vfold_cv( data, radius = NULL, buffer = 0.1, v = 10, repeats = 1, presence = NULL, pool = 0.1, ... )
... |
sdm_data
object suitable for a
tidysdm
workflow.Convert presence points and a background area
into an sdm_data
object suitable for a
tidysdm
workflow.
sdm_data(pres, bg, n = 500, abs = NULL, sample_options = list(), ...)
sdm_data(pres, bg, n = 500, abs = NULL, sample_options = list(), ...)
pres |
Points representing species
occurrences. Should be an |
bg |
A background area as an |
n |
Integer specifying the number of background or pseudo-absence
points to sample from the background as specified by |
abs |
Optionally an |
... |
A sdm_data
object inheriting from a tibble
Title
step_sample_pseudo_absences( recipe, bg_geometry = NULL, role = NA, trained = FALSE, size, options = list(type = "random", exact = FALSE), skip = FALSE, id = rand_id("sample_pseudo_absences") )
step_sample_pseudo_absences( recipe, bg_geometry = NULL, role = NA, trained = FALSE, size, options = list(type = "random", exact = FALSE), skip = FALSE, id = rand_id("sample_pseudo_absences") )
id |