Calculate and plot for different numbers of tree, the out-of-bag errors associated with an ABC-RF object

Share:

Description

err.abcrf returns out-of-bag errors and plot them.

Usage

1
err.abcrf(object, training, paral=FALSE, ncores= if(paral) max(detectCores()-1,1) else 1)

Arguments

object

an abcrf object.

training

the data frame containing the reference table used to train the abcrf object.

paral

a boolean that indicates if random forests predictions should be parallelized.

ncores

the number of CPU cores to use for the random forest predictions. If paral=TRUE, it is used the number of CPU cores minus 1.

Value

a matrix with 2 colunms: the number of trees and the out-of-bag errors

References

Pudlo, P., Marin, J.-M., Estoup, A., Cornuet, J.-M., Gautier, M. and Robert, C.P. (2016) Reliable ABC model choice via random forests Bioinformatics http://bioinformatics.oxfordjournals.org/content/32/6/859

See Also

abcrf, predict.abcrf, plot.abcrf

Examples

1
2
3
4
5
6
data(snp)
modindex <- snp$modindex[1:500]
sumsta <- snp$sumsta[1:500,]
data1 <- data.frame(modindex, sumsta)
model.rf <- abcrf(modindex~., data1, ntree=100)
err.rf <- err.abcrf(model.rf, data1)