[Qst] Numerical Instability when using double as input
- Dominant language
- C++
- Stars
- 830
- Forks
- 112
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 18
Description
I used tl2cgen to compile my model file, it is a really nice tool!
But since there's no missing value and qvalue needed in my case, i changed function input parameter to double* data, however, I found there's some stability issue that <1% of predict results can not match the one generated by LightGBM boosting api, btw, our tree is really sensitive to precision (the node threshold are small value with many decimal place). The problem is finally fixed by changing the input parameter to const double* data, But I am pretty sure that I am not changing the data anywhere.
Anyone has idea about the reason?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the tl2cgen prediction entry point and compare its double* and const double* input paths with results from the LightGBM boosting API. Reproduce the sub-1% precision-sensitive mismatch using a tree with small decimal thresholds, then establish why changing constness affects predictions and document a verified resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100