Skip to content

Instantly share code, notes, and snippets.

@chelseaparlett
Created August 27, 2019 18:37
Show Gist options
  • Save chelseaparlett/98bc615603b5eb9822dd13bbdf6b6146 to your computer and use it in GitHub Desktop.
Save chelseaparlett/98bc615603b5eb9822dd13bbdf6b6146 to your computer and use it in GitHub Desktop.
library(ranger)
y <- rnorm(1000)
x1 <- rnorm(1000)
x2 <- rnorm(1000)
df <- data.frame(y,x1,x2)
rf <- ranger(y~ x1 + x2, data = df, importance = "permutation")
rf$variable.importance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment