86d26b46a5
### What changes were proposed in this pull request? use `lazy array` instead of `var` for auxiliary variables in binary lor ### Why are the changes needed? In https://github.com/apache/spark/pull/29255, I made a mistake: the `private var _threshold` and `_rawThreshold` are initialized by defaut values of `threshold`, that is beacuse: 1, param `threshold` is set default value at first; 2, `_threshold` and `_rawThreshold` are initialized based on the default value; 3, param `threshold` is updated by the value from estimator, by `copyValues` method: ``` if (map.contains(param) && to.hasParam(param.name)) { to.set(param.name, map(param)) } ``` We can update `_threshold` and `_rawThreshold` in `setThreshold` and `setThresholds`, but we can not update them in `set`/`copyValues` so their values are kept until methods `setThreshold` and `setThresholds` are called. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? test in repl Closes #30013 from zhengruifeng/lor_threshold_init. Authored-by: zhengruifeng <ruifengz@foxmail.com> Signed-off-by: zhengruifeng <ruifengz@foxmail.com> |
||
---|---|---|
.. | ||
benchmarks | ||
src | ||
pom.xml |