Skip to content

Decision Tree leaf node assignments in rpart  #47

@wreck84

Description

@wreck84

I want to create a feature/column in a dataset that indicates which leaf node a record belongs to, based on the leaf node prediction. Examining the feature values and conducting a one-way anova on the leaf nodes are the main goals.

I do not understand the rpart documentation enough to see if rpart already provides that functionality. I am self-taught in R.

I tried to create a nested series of ifelse statements one at a time to make sure I didn't flub up on the syntax, but that only worked for a while. Eventually, it got to the point where I got error messages that could not be resolved. It is a very large decision tree with 16 leaf nodes.

Performing this task in R would be best, but exporting the dataset to Excel and re-importing it into R seems to be my only alternative at the moment.

I would appreciate it if someone had any suggestions on how to complete this task in R, rpart, or some other package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions