crossv_cluster: Generate non-random cross-validated test-training pairs

Description Usage Arguments Value

View source: R/nonrandom_crossv.R

Description

Generate non-random cross-validated test-training pairs

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
crossv_cluster(data, n = 5, cluster, id = ".id")

crossv_loo(data, cluster, response = "occ", id = "holdout",
  buffer = NULL)

crossv_grid(data, n = c(3, 3), response = "occ", id = ".id")

crossv_predstrat(data, n = 5, id = ".id", response = "occ",
  id_col = "id")

crossv_temporal_blocking(data, cluster, blocksize, time = "year",
  id = ".id")

crossv_year_window(data, windowsize)

Arguments

data

A data frame

n

Number of test-training pairs to generate (an integer). Either single number of cluster groups, or vector with number of columns, rows of sampling grid.

cluster

Name of the clustering variable.

id

Name of variable that gives each model a unique integer id.

response

Name of the response variable.

Value

A data frame with n / prod(n) rows and columns test and train. test and train are list-columns containing resample objects.


juoe/sdmflow documentation built on Feb. 23, 2020, 7:38 p.m.