[R] randomForest partial dependence plots
Hello ALL, I'm unsure how to interpret partial dependence plots and had 2 questions: Does the randomForest library scale partial dependence plots such that zero on the y axis is mean(y)? I am also unclear as to why the range of y on these plots is smaller than what is in the dataset. Also I have noticed that partial dependence plots cluster around the mean response. That is, if I'm looking at the partial dependence plot of y given x1, x2, x3 and I standardize the x's (so they scale sensibly to be displayed on one graph) then everything seems to meet at mean(y) and z-score of 0 for all x's. The match is not exact but is close and shows up in all partial dependence plots I've looked at for this particular project. A sample graph of this is here: img213 imagevenue com/img php?image=48746_partial_plot_122_538lo jpg [replace spaces with dots, this bounces otherwise] I am unsure if this means anything or if it's built in (like a SLR going thru the mean of x an y). I should note that for this example I have assumed that the y-axis is not scaled somehow (see first question). Any insight appreciated. Thanks for your time. Christopher __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Using tune with gbm --grid search for best hyperparameters
Hello LIST, I'd like to use tune from e1071 to do a grid search for hyperparameter values in gbm. However, I can not get this to work. I note that there is no wrapper for gbm but that it is possible to use non-wrapped functions (like lm) without problem. Here's a snippet of code to illustrate. > data(mtcars) obj <- > gbm(mpg~disp+wt+carb,data=mtcars,distribution="gaussian",n.trees=1000,n.minobsinnode=5) > > summary(obj) #just to demonstrate that gbm worked var rel.inf 1 disp 55.185469 2 wt 40.198605 3 carb 4.615926 # now let's find the best value for n.minobsinnode using tune > tune.obj <- > tune(gbm,mpg~disp+wt+carb,data=mtcars,distribution="gaussian",n.trees=1000,n.minobsinnode=c(5,10,15)) Error in function (formula = formula(data), distribution = "bernoulli", : unused argument(s) (subset = c(23, 9, 18, 26, 32, 28, 16, 5, 25, 24, 21, 8, 6, 7, 13, 1, 30, 17, 2, 29, 3, 27, 31, 12, 15, 11, 4, 22)) I've tried many variations on syntax --too many to count. But this error message will not go away. Does tune simply not work with gbm or is something else going on. Many thanks for any insight. Christopher __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Cryptic error message using RuleFit
Hello LIST, In using Rulefit I;ve bee nabel to fit a model using rulefit without incident. However, when trying to use intnull and interact things go astray. > rf=rulefit(x,"N", cat.vars="H", > not.used=c("G","T"),huber=0.9,path.speed=1); [snip] RuleFit model 2/26/2008 2:17p ave(abs(error)) terms path steps 84.16 110 8301 > null.mod <- intnull() [snip building trees and fitting rules] Warning messages: 1: In system("mv -f rulefit.mod mod.sv") : mv not found 2: In system("mv -f rulefit.sum sum.sv") : mv not found 3: In system("mv -f rfout out.sv") : mv not found 4: In system("mv -f train.y train.sv") : mv not found 5: In system("mv -f mod.sv rulefit.mod") : mv not found 6: In system("mv -f sum.sv rulefit.sum") : mv not found 7: In system("mv -f train.sv train.y") : mv not found 8: In system("mv -f out.sv rfout") : mv not found > int = interact(c("A", "M", "H", "P"), null.mod) Error in interact(c("A", "M", "H", "P"), null.mod) : input null.mods inconsistent with RuleFit home directory model. Something is amiss with the directory but it looks fine (the files from rf are present and where they should be based on the installation notes) and I can not figure out what the missing piece here is. Any insight appreciated. Thanks, Christopher __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Package for Multiple Additive Regression Trees
Hello List, I've been unsuccessful in tracking down a package that does MART. J Friedman's website has a page that mentions an R implementation but the links lead nowhere. There is also a nice walkthru/vignette pdf on his site. But I can not find this package anywhere. Perhaps it's commercial? Does anyone know of where it might be available or of any other R package (or Matlab toolbox) that can do MART? Many thanks, Christopher __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.