add.null.class: Add a Null Class

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/add.null.class.R

Description

Create nMC observations of a null class.

Usage

1
add.null.class(target, predictors, nMC = 50)

Arguments

target

Column with names of classes.

predictors

The columns containig the predictor variables.

nMC

Number returned observations of the null class (default = 50).

Details

A null class has no multivariate structure. It is created by shuffling the rows across the whole dataset and then shuffling the column labels. By doing so we generate nMC in silico observations for a class containing only random variable values but preserving the variable space.

Value

Dataframe with original observatios and nMC observations of a null class. First column named 'class' contains the target classes, predictor names are mantained.

Author(s)

Pedro Martinez Arbizu & Sven Rossel

References

Rossel, S. & P. Martinez Arbizu (2018) Automatic specimen identification of Harpacticoids (Crustacea:Copepoda) using Random Forest and MALDIā€TOF mass spectra, including a post hoc test for false positive discovery. Methods in Ecology and Evolution, 9(6):1421-1434.

https://doi.org/10.1111/2041-210X.13000

See Also

smooth.data

Examples

1
2
3
data(iris)
iris.null <- add.null.class(iris$Species,iris[,1:4])
summary(iris.null)

pmartinezarbizu/RFtools documentation built on March 10, 2021, 12:11 p.m.