Learn R Programming

tree.bins (version 0.1.1)

Recategorization of Factor Variables by Decision Tree Leaves

Description

Provides users the ability to categorize categorical variables dependent on a response variable. It creates a decision tree by using one of the categorical variables (class factor) and the selected response variable. The decision tree is created from the rpart() function from the 'rpart' package. The rules from the leaves of the decision tree are extracted, and used to recategorize the appropriate categorical variable (predictor). This step is performed for each of the categorical variables that is fed into the data component of the function. Only variables containing more than 2 factor levels will be considered in the function. The final output generates a data set containing the recategorized variables or a list containing a mapping table for each of the candidate variables. For more details see T. Hastie et al (2009, ISBN: 978-0-387-84857-0).

Copy Link

Version

Install

install.packages('tree.bins')

Monthly Downloads

3

Version

0.1.1

License

GPL-2

Maintainer

Piro Polo

Last Published

June 14th, 2018

Functions in tree.bins (0.1.1)

tree.bins

Recategorization of Factor Variables by Decision Tree Leaves
AmesImpFctrs

A Subset of the Ames Data Set with Imputed Values Only Including Factor Variables and Sale Price
AmesImp

A Subset of the Ames Data Set with Imputed Values
AmesSubset

A Subset of the Ames Data Set
bin.oth

Recategorization of Variables by Mapping Tables Within a List