split_validation: Split data into training/testing groups

Description Usage Arguments Value Examples

Description

split_validation takes an object of class Obs and returns a list of two objects of class Obs, where one object contains the training data and the other contains the validation data. If the data is spatio-temporal, the validation data can be chosen to be co-located in space.

Usage

1
2
3
4
split_validation(.Object, samples, common, ...)

## S4 method for signature 'Obs'
split_validation(.Object, samples, common = 0, ...)

Arguments

.Object

an object of class Obs.

samples

an integer identifying the number of observations to use for validation.

common

a flag which, if 1, indicates that validation data should be chosen to coincide spatially. This flag is not relevant if the data is not spatio-temporal.

...

further arguments passed on to subset.

Value

a list of two objects of class Obs.

Examples

1
2
3
data(icesat)
icesat_obs <- Obs(df=icesat)
O2 <- split_validation(icesat_obs,100,common=0, t > 0)

shazhe/mvst0 documentation built on May 29, 2019, 9:20 p.m.