forestFloor is no longer listed on CRAN, as I have been too lazy to fix build warnings on some exotic issues. However, the package works fine for the latest R (+4.x.x).
#use devtools to locate rtools and install forestFloor from github
install.packages("devtools")
#for windows
#make sure rtools is installed on your machine
#https://cran.r-project.org/bin/windows/Rtools/
devtools::find_rtools()
#for mac xcode and Xquartz must be installed to support rgl 3D-package
#For linux a gcc or clang compiler must be available
#then this will work
devtools::install_github("sorhawell/forestFloor")
library(forestFloor)
?forestFloor
Experimental support for caret, see last example at help(forestFloor) Complain here: https://github.com/sorhawell/forestFloor/issues/27
Bug fix in show3d when plotting factors. Conversion of factors to numbers could fail. Bug fix intended plot main titles generated by plot.forestFloor_regression have been missing in the last couple of patches. New documentation for fcol
Bug fix of how importance is extracted from randomForest object to forestFloor object, see issue#21 on github. From now on forestFloor package depends on extractor function randomForest::importance. Arguments can be passed to importance, see forestFloor help file under ... arguments.
Features:
Features:
Bug-fix:
Features:
It is now possible to compute feature contributions of feature test set Xtest. Formula interface not implemented for Xtest yet. For data.frame X and Xtest, names and classes of columns (numeric/factor). Also, levels of factors must match. Any used level in any factor of Xtest must have been used at least once in X during training. If Xtest is provided, any visualization will as standard visualize feature contributions of Xtest rather than X. plotTest=F will revert this. plotTest="andTrain" (partial matched) will enable visualization of both test and train. In the forestFloor output object, feature contributions for X and Xtest are row binded in the same matrix FCmatrix / FCarray. A booleen vector isTrain describes what rows are train and what are test.
Bootstrapping and stratification can also be seen as local increments and do influence the final RF prediction. To precisely assure, that all feature contributions for each observation do sum to the RF OOB-CV prediction, a new param bootstrapFC has been included. When set to TRUE, one extra column is added to FCmatrix(regression) or n.classes columns to the FCarray(classification). Each tree has a 'bootstrap local increment' (bootstrapLI). bootstrapLI = rootNode_rate - base_rate, where rootNode_rate is the bootstrapped sampled (inbag) class label distribution in root node, and base_rate is the overall class label distribution in training set. bootstrapFC is for a given observation the sum of bootstrapLI in those trees, where that observation was out-of-bag. bootstrapFC=TRUE does not change any visualization.
Bug-fix:
1.9.0-1.9.1
Misc:
1.8.9
1.8.7-1.8.8: