robust.test: RF Robustness Test

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

View source: R/robust.test.R

Description

Test how prone is your RF model to misclassification of classes, that were not included in the training dataset after applying the post-hoc test.

Usage

1
robust.test(target, predictors, nMC = 999, q = 0.05)

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 = 999)

q

Number, quantile to use for the post-hoc test, default 0.05

Details

RF Robustness Test: Models are calculated leaving one class out. Observations of the class that is excluded from the training dataset are used to predict with the trained model. It is evident that these observations cannot belong to any of the target classes. After prediction, the post-hoc test for false positive discovery is applied to the results. A residual false positive rate is calculated. Row lables display the class that was excluded from the model. Column names display the predicted class.

Value

An object of class RBT. List with results of RF robustness test.

assignment

Table with the class assigments per model

false.pos

Table with the false positives, after post-hoc test, per model

false.pos.rate

Table with the false positive rate, after post-hoc test, per model

Author(s)

Pedro Martinez Arbizu

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 smooth.data

Examples

1
2
3
data(iris)
rbt.iris <- robust.test(iris$Species,iris[,1:4])
print(rbt.iris)

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