Guest User

varimp

a guest
Dec 3rd, 2013
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.92 KB | None | 0 0
  1. ### Region continuous
  2. R> set.seed(1)
  3. R> bll = read.csv("bll_SB.csv", header=TRUE)
  4. R> bll_SB <- na.omit(data.frame(bll))
  5. R> bll_SB$SB_Pres <- factor(bll_SB$SB_Pres)
  6. R> SBcf <- cforest(SB_Pres ~ ., data=bll_SB,  control=cforest_unbiased())
  7. R> varimp(SBcf, conditional = FALSE)
  8.         Slope      Dist2Shr         Bathy          Chla           SST
  9.      0.003296      0.012235      0.014388      0.089745      0.028143
  10. DaylightHours     MoonPhase        Region
  11.      0.008847      0.003367      0.095878
  12.  
  13. ### Region categorical
  14. R> set.seed(1)
  15. R> bll_SB$Region <- factor(bll_SB$Region)
  16. R> SBcf <- cforest(SB_Pres ~ ., data=bll_SB,  control=cforest_unbiased())
  17. R> varimp(SBcf, conditional = FALSE)
  18.         Slope      Dist2Shr         Bathy          Chla           SST
  19.      0.003633      0.015908      0.008286      0.085367      0.028847
  20. DaylightHours     MoonPhase        Region
  21.      0.009520      0.002969      0.093061
Advertisement
Add Comment
Please, Sign In to add comment