|
DATA MINING
Desktop Survival Guide by Graham Williams |
|
|||
|
The minsplit specifies the minimum number of observations that must exist at a node in the tree before any further splitting will be attempted.
Using rpart directly we specify minsplit within an option called control which takes the results from a function called XnullXR functionsR functions (R function)R functionsR libraries (R library)R functionsR option (R option)R functionsR packages (R package)R functionsDatasets (Dataset)R functionsR functionsrpart.control. In this example we
> audit <- read.csv(url("http://rattle.togaware.com/audit.csv"))
> audit.rpart <- rpart(TARGET_Adjusted ~ Age + Marital
+ Occupation
+ Deductions,
data=audit,
method="class",
control=rpart.control(minsplit=150))
> audit.rpart
|