Model Based Random Forest Analysis

Functions to implements random forest method for model based recursive partitioning. The mob() function, developed by Zeileis et al. (2008), within 'party' package, is modified to construct model-based decision trees based on random forests methodology. The main input function mobforest.analysis() takes all input parameters to construct trees, compute out-of-bag errors, predictions, and overall accuracy of forest. The algorithm performs parallel computation using cluster functions within 'parallel' package.


travis-ci build status CRAN statusbadge mobForest implements random forest method for model based recursive partitioning. The mob() function, developed by Zeileis et al (2008), within party package, is modified to construct model-based decision trees based on random forests methodology. The main input function mobforest.analysis() takes all input parameters to construct trees, compute out-of-bag errors, predictions, and overall accuracy of forest. The algorithm performs parallel computation using clusterApply() function within the parallel package.

Installation

install.packages("mobForest")

Usage

To run the example, you will need the mlbench package. It contains a boston housing dataset for machine learning algorithms to run benchmark tests on.

library(mlbench)
set.seed(1111)
# Random Forest analysis of model based recursive partitioning load data
data("BostonHousing", package = "mlbench")
BostonHousing <- BostonHousing[1:90, c("rad", "tax", "crim", "medv", "lstat")] 

# Recursive partitioning based on linear regression model medv ~ lstat with 3 trees.  1 core/processor used. 
rfout <- mobforest.analysis(as.formula(medv ~ lstat), c("rad", "tax", "crim"),
mobforest_controls = mobforest.control(ntree = 3, mtry = 2, replace = TRUE,
        alpha = 0.05, bonferroni = TRUE, minsplit = 25), data = BostonHousing,
        processors = 1, model = linearModel, seed = 1111)
rfout

News

Updating to R 3.4.3

Our latest version of mobForest was focused on revamping existing code to work with the newest version of R. We also made strides to consolidate all code to common formats. Although no substantive changes were made (no new functions or changes to algorithms), users should be aware of these smaller tweaks.

  • All mobForest functions now use the period.sep naming convention
  • All mobForest specific parameters now use the underscore_sep naming convention
  • Unit tests were written for many of the basic functions. Although several tests are not ran using testthat. These tests were causing R CMD Check to run indefinitely. Forums suggested that this happens when using the parallel package. All tests passed on the latest build when ran locally.
  • CRAN suggests not using ::: when calling hidden functions of another package. To overcome this, we copied the necessary hidden packages from party into utility.R.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("mobForest")

1.3.0 by Kasey Jones, a year ago


Browse source code at https://github.com/cran/mobForest


Authors: Nikhil Garge [aut] , Barry Eggleston [aut] , Georgiy Bobashev [aut] , Benjamin Carper [cre] , Kasey Jones [ctb, cre] , Torsten Hothorn [ctb] , Kurt Hornik [ctb] , Carolin Strobl [ctb] , Achim Zeileis [ctb]


Documentation:   PDF Manual  


GPL (>= 2) license


Imports methods, modeltools, stats, graphics

Depends on parallel, party, sandwich, strucchange, zoo

Suggests testthat, mlbench, lattice


See at CRAN