JuliaAI / JuliaAI/DecisionTree.jl
Some questions about `prune_tree`.
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 364
- Forks
- 100
- PR merge metrics
- No merged PRs in 30d
Description
The prune_tree function for classification trees internally calls _prune_run which computes the purity using the zero-one loss. However, decision trees are built using the entropy purity. I'm not sure if this is done on purpose or if it's a bug.
The latter can be fixed easily, but we might also address the more general problem and make prune_tree criterion-agnostic by storing the purity of the node in a struct field (which is already a byproduct of tree building) and, instead of recomputing the node purity, have the function refer to that field. This will also make the same prune_tree function work on both regression and classification trees.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing prune_tree and its internal _prune_run call, then compare the purity computed during pruning with the entropy-based purity used when building classification trees. Review the existing discussion before deciding whether to correct the classification behavior or make pruning criterion-agnostic for both classification and regression trees.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100