Skip to content

DecisionTreeDiscretiser to output integers in addition to the predictions #452

Description

@solegalli

At the moment, the DecisionTreeDiscretiser returns the values of the tree predictions as the replacement of the original variables.

I would like to add the option to return integers from 1 to k (or 0 to k-1), where k is the number of final leaves. The numbers increase with the mean value target per leave.

Not sure how difficult it is to implement, I think we sort of need to navigate the tree somehow, pick up the final values at the leaves, and then create a mapping from final value to the integer. And add a parameter in the init where the user can specify if they want integers or predictions as output.

The addition is suggested after the Self-Guided via CART method available in MINITAB and described here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or extended functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions