smooth.data: Smooth Classes

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

View source: R/smooth.data.R

Description

Create a new dataset with smoothed classes and nMC observations per class.

Usage

1
smooth.data(target, predictors, nMC = 100)

Arguments

target

Vector or target Column with names of classes.

predictors

Dataframe or matrix with predictor variables.

nMC

Number of smoothed observations returned per class (default = 100)

Details

For each class, the function will shuffle the rows of each predictor separately and extract nMC rows for each class. By doing so we generate nMC in silico observations for each class, but mantaining the range (observed variability) for each predictor.

Value

Dataframe with nMC smoothed observations. 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

add.null.class

Examples

1
2
3
data(iris)
iris.sm <- smooth.data(iris$Species,iris[,1:4])
summary(iris.sm)

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