Last active
January 19, 2022 14:44
-
-
Save bpbond/8bbb7aa0d0dc845e54b243ae42f1d0f3 to your computer and use it in GitHub Desktop.
Random Forest on random data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Makes the inset plot shown in https://twitter.com/BenBondLamberty/status/1483560012844838922?s=20 | |
set.seed(21) | |
n <- 750 | |
x <- data.frame(x = runif(n)) | |
for(vn in 1:70) { | |
x[paste0("v", vn)] <- runif(n) | |
} | |
library(randomForest) | |
rfm <- randomForest::randomForest(x ~ ., data = x) | |
varImpPlot(rfm) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment