classPriors {rfPermute} | R Documentation |
Class Priors
Description
Compute the class classification priors and class-specific model binomial p-values using these priors as null hypotheses.
Usage
classPriors(x, sampsize)
Arguments
x |
a |
sampsize |
the vector of sample sizes used to construct the model. If
provided, must have length equal to number of classes. If set to
|
Author(s)
Eric Archer eric.archer@noaa.gov
See Also
balancedSampsize
, confusionMatrix
Examples
library(randomForest)
data(mtcars)
# random sampling with replacement
rf <- randomForest(factor(am) ~ ., mtcars)
confusionMatrix(rf)
classPriors(rf, NULL)
# balanced design
sampsize <- balancedSampsize(mtcars$am)
rf <- randomForest(factor(am) ~ ., mtcars, replace = FALSE, sampsize = sampsize)
confusionMatrix(rf)
classPriors(rf, sampsize)
[Package rfPermute version 2.5.2 Index]