JuliaAI / JuliaAI/DecisionTree.jl
Forest Construction Hangs
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 364
- Forks
- 100
- PR merge metrics
- No merged PRs in 30d
Description
Hello. I was attempting to build a decision tree using Float32 data and construction seems to hang for certain input data. Here's a small example.
using DecisionTree
#Tree construction does not seem to hang for Float64s with this array, but does for Float32s and 16s.
#I have had hangs with Float64's with different data.
indep=Float32.([ 9.4 9.4 1.1
9.4 9.4 -0.0
9.4 9.4 1.9
9.4 9.4 1.4
9.4 9.4 1.1
9.4 9.4 0.0])
dep=Float32.([ -0.4
-0.2
-1.1
0.0
0.0
0.0])
#The decision tree construction hangs for 9.4, -1.0, and 15.6, but not for 2.0 or 2.5??
indep[indep.≈9.4] .= 15.6
display(dep)
display(indep)
#This occasionlly doesn't hang the first time, but it has always done so on the second run.
build_forest(dep, indep, size(indep, 2), 10, 0.7)
When I managed to keyboard interrupt this in the REPL it seemed to be getting stuck in some threading situation.
Here are the versions+hardware I'm using
DecisionTree: v0.10.11
Julia: v"1.6.3" for Intel Mac (downloaded as a binary from the Julia Website) running through Rosetta 2
Computer: MacBookAir with M1 Chip.
I also downloaded Julia1.7 for Intel and AArch64, and got the same hang.
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 with the reproducible Float32 example in the issue and run build_forest(dep, indep, size(indep, 2), 10, 0.7) using the reported Julia and DecisionTree versions. Trace the forest-construction entry point and its threading behavior, then verify that the example completes reliably for the reported input values and numeric types without hanging.
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
- 25/100