get_folds: Get folds

Description Usage Arguments Details Value See Also Examples

View source: R/load.R

Description

get_folds returns the different pre-generated folds information. To get the fold data for a species see also get_fold_data.

Usage

1
get_folds(type = "disc")

Arguments

type

character. The type of partitioning you want to load.

Details

The different supported type are:

"disc": 5-fold disc partitioning of occurrences with pairwise distance sampled and buffer filtered random background points, equivalent to calling kfold_occurrence_background with occurrence_fold_type = "disc", k = 5, pwd_sample = TRUE, background_buffer = 200*1000

"grid_4" and "grid_9": 4-fold and 9-fold grid partitioning of occurrences with pairwise distance sampled and buffer filtered random background points, equivalent to calling kfold_occurrence_background with occurrence_fold_type = "grid", k = 4, pwd_sample = TRUE, background_buffer = 200*1000

"random": 5-fold random partitioning of occurrences and random background points, equivalent to calling kfold_occurrence_background with occurrence_fold_type = "random", k = 5, pwd_sample = FALSE, background_buffer = 0

"targetgroup": same way of partitioning as the "random" folds but instead of random background points, a random subset of all occurrences points was used creating a targetgroup background points set which has the same sampling bias as the entire dataset.

Value

A list with two entries "background" and "species", each entry is a dataframe with species name column and 5 fold columns as created by kfold_occurrence_background

See Also

lapply_kfold_species get_fold_data get_occurrences get_background kfold_data

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
folds <- get_folds("random")

abalistes <- "Abalistes stellatus"
occ <- get_occurrences(abalistes)
bg <- get_background("random")

occ_train <- kfold_data(abalistes, occ, folds$species, k=1, training=TRUE)
occ_test <- kfold_data(abalistes, occ, folds$species, k=1, training=FALSE)
bg_train <- kfold_data(abalistes, bg, folds$background, k=1, training=TRUE)
bg_test <- kfold_data(abalistes, bg, folds$background, k=1, training=FALSE)

## End(Not run)

samuelbosch/marinespeed documentation built on Dec. 17, 2019, 11:47 p.m.