trainSplit: Generate random selections of training/testing datasets

Description Usage Arguments Value Author(s)

Description

This function return a logical vector specifing which elements should be used for training or testing the dataset. It allow to specify several replicates, and then the output will be a matrix with as many columns as replicates have been specified. It also allow to change the proportion of training data which is 0.7 by default.

Usage

1
trainSplit(m, nRep=1, perc=0.7, seed=NULL)

Arguments

m

Matrix. Community matrix that will be splitted in training and testing datasets.

nRep

Value. The number of replicates that will be run. Then the same number of random vector will be created and returned in a matrix.

perc

Value. Value in the range of 0 to 1 indicating the proportion of points to be used in training.

seed

Value. This value is used as initial seed for the first replicate, the next replicates will increase this seed by adding the number of the replicate.

Value

Matrix. The output is a matrix with one column for each replicate indicated (nRep). The number of rows in the matrix correspond with the number of sites in the community matrix (m).

Author(s)

Diego Nieto Lugilde


dinilu/paleoCLMs-package documentation built on May 15, 2019, 8:46 a.m.