RuleFit3 with R
Beta version (7/07/12)
RuleFittm implements the learning method and interpretational tools described in Predictive Learning via Rule Ensembles (pdf).
RuleFit3tm is a newer version with improved analytics and some additional options. A principal improvement is the use of glmnet (Friedman, Hastie, and Tibshirani 2008) to perform rule fitting . This provides the full sprectum of elastic net procedures from the lasso to ridge regression, thereby allowing the user to decrease the sparsity (increase the number of terms) in the final model from that provided by the lasso. Sparser models than the lasso can be obtained by choosing forward stepwise or forward statewise rule fitting. Also a different method for cross-validated model selection is implemented that usually results in more accurate models and more honest (less optimistic) estimates of future prediction error. This is especially the case for smaller training data sets. There is also a wider variety of model selection criteria from which to choose for selecting the number of terms in the final model. The previous version of RuleFittm can be obtainded from here.
The files provided here implement a rudimentary interface for using RuleFit3tm with the R statistical package. R is freely available from The R Project for Statistical Computing. This R/RuleFit3 interface runs on PC compatible computers with Windows XP/Vista/7, Linux, and Mac OS X (version 10.6 or later). This present version of the R/RuleFit3 interface will not function after December 29, 2017. Future versions will be available after that date. Note that this is a beta version of the program. Please report any problems to jhf@stanford.edu and periodically check this site for updated versions.
It is assumed that R has already been installed on the computer. The first step is to create a (target) directory in which to store the downloaded files. This directory should be used only for the R/RuleFit installation and contain no other files or sub-directories. Its full path name must contain NO imbedded blanks. For Windows, this directory must reside on the same logical disk where R is installed.
Windows XT/Vista/7
Transfer the files rulefit.r, rf_go.exe, move.bat, RuleFit_help.html to the target directory with these same names.
Open RuleFit_help.html with a web browser.
Follow the R installation instructions contained therein to complete the installation.
Linux
Transfer the files rulefit.r, rf_go.exe, RuleFit_help.html to the target directory with these same names.
Execute the following command at the Linux command prompt in the target directory:
Open RuleFit_help.html with a web browser.
Follow the R installation instructions contained therein to complete the installation.
Mac OS X (version 10.6 or later)
Transfer the files rulefit.r, rf_go.exe, RuleFit_help.html to the target directory with these same names.
Execute the following command in the terminal window at the command prompt in the target directory:
Open RuleFit_help.html with a web browser.
Follow the R installation instructions contained therein to complete the installation.
Complete documentation for all R/RuleFit procedures is provided in the html help file RuleFit_help.html . Some familiarity with the above paper is recommended, especially when experimenting with some of the more advanced features and options.
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.