Free Access Week-  Data Engineering + BI
Data engineering and BI courses are free!
Free AI Access Week from June 2-8

abcrf (version 1.9)

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

Description

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

Usage

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

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.

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.

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 tools:::Rd_expr_doi("10.1093/bioinformatics/btv684")

See Also

abcrf, predict.abcrf, plot.abcrf

Examples

Run this code
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)

Run the code above in your browser using DataLab