err.abcrf: Calculate and plot for different numbers of tree, the...

Description Usage Arguments Value References See Also Examples

View source: R/err.abcrf.R

Description

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

Usage

1
2
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. If ncores is not specified and detectCores does not detect the number of CPU cores with success then 1 core is used.

Value

a matrix with 2 columns: the number of trees and the out-of-bag errors. Errors are computed from 40 trees to the total number.

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)

abcrf documentation built on Sept. 4, 2017, 5:02 p.m.

Related to err.abcrf in abcrf...