err.regAbcrf | R Documentation |
err.regAbcrf
returns out-of-bag mean squared errors and plot them.
err.regAbcrf(object, training, paral=FALSE, ncores= if(paral) max(detectCores()-1,1) else 1, what="mean")
object |
a |
training |
the data frame containing the reference table used to train the |
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 |
what |
a string caracter "mean" or "median" indicating if the predictions are computed with mean or median of the response variable. |
A matrix with 2 columns: the number of trees and the out-of-bag mean squared errors. NAs might be returned if the number of trees is too low. Errors are computed from 40 trees to the total number.
Raynal L., Marin J.-M. Pudlo P., Ribatet M., Robert C. P. and Estoup, A. (2019) ABC random forests for Bayesian parameter inference Bioinformatics doi: 10.1093/bioinformatics/bty867
regAbcrf
,
predict.regAbcrf
,
plot.regAbcrf
,
densityPlot
,
covRegAbcrf
,
ranger
data(snp) modindex <- snp$modindex sumsta <- snp$sumsta[modindex == "3",] r <- snp$param$r[modindex == "3"] r <- r[1:500] sumsta <- sumsta[1:500,] data2 <- data.frame(r, sumsta) model.rf.r <- regAbcrf(r~., data2, ntree=100) err.regAbcrf(model.rf.r, data2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.