createSubset: Create a training subset from data

Description Usage Arguments Value Author(s) See Also

Description

Bases on createDataPartition from the caret package.

Usage

1
2
createSubset(predictors, response, out = "Rain", threshold = 0.06,
  sampsize = 0.01, seed = 20)

Arguments

predictors

Either a data.frame with each column is one predictor and each row represents one pixel. Or (if only one scene is used for training) a RasterStack with one Raster is one Predictor Variable.

response

A vector of either Rainfall area or rainfall rates for the corresponding pixels in predictors. If only one scene is used for model training, "response" may also be a RasterLayer of the response variable.

out

Either Rain or RInfo indicating weather rainfall rates or rainfall areas should be used.

threshold

if response is Rainfall rate: pixels larger than the threshold are used for rainfall rate training

sampsize

Numeric value between 0 and 1 indicating the percentage of data points to be returned

seed

see set.seed

Value

A list with two entries: predictors and response

Author(s)

Hanna Meyer

See Also

createDataPartition


environmentalinformatics-marburg/Rainfall documentation built on May 16, 2019, 7:49 a.m.