JuliaAI / JuliaAI/DecisionTree.jl
Adding a new field to the `Leaf` API to support sample weights
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 364
- Forks
- 100
- PR merge metrics
- No merged PRs in 30d
Description
I'm thinking of adding support for sample weights, which isn't compatible with the current Leaf struct. More specifically, the field values in the struct lists every label that falls into the leaf with multiplicity, but does not give the weight of each label in the list. To add support for sample weights, I propose that we do either of the following:
- Add a new field of the
weightsto theLeafstruct such thatleaf.weight[i]gives the sum of the weights of the label inleaf.values[i] - Change
leaf.valuesinto a dictionary mapping each label to the sum of its weight, i.e.,leaf.values[d]gives the weight of the labeld.
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 locating the Leaf struct and every use of its values field. Compare the proposed weights field and dictionary representations, then determine which API preserves the needed label information while supporting sample weights. Done means the chosen Leaf representation is implemented consistently and sample-weight behavior is supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- api, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100