Description Usage Arguments Value Author(s) Examples
Determine the selecton frequency threshold of a model at a specified false positive rate
1 | sft(x, alpha)
|
x |
a |
alpha |
a false positive rate (ie, 0.01) |
a list of two elements
sft Tthe selection frequency threshold
probs_atsft The esimated false positive rate
Tom Wilson tpw2@aber.ac.uk
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | library(randomForest)
data(iris)
iris.rf <- randomForest(iris[,-5], iris[,5], forest = TRUE)
# For a false positive rate of 1%
iris.sft <- sft(iris.rf, 0.01)
print(iris.sft)
# To iterate through a range of alpha values
alpha <- c(0.01,0.05, 0.1,0.15,0.2, 0.25)
threshold <- NULL
for(i in seq_along(alpha)){
threshold[i] <- sft(iris.rf, alpha[i])$sft
}
plot(alpha, threshold, type = 'b')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.