[jvm-packages] Fix wrong method name setAllowZeroForMissingValue. (#5740)

* Allow non-zero for missing value when training.

* Fix wrong method names.

* Add a unit test

* Move the getter/setter unit test to MissingValueHandlingSuite

Co-authored-by: Hyunsu Cho <chohyu01@cs.washington.edu>
This commit is contained in:
Shaochen Shi
2020-08-02 08:16:42 +08:00
committed by GitHub
parent 5a2dcd1c33
commit 71197d1dfa
3 changed files with 46 additions and 2 deletions

View File

@@ -141,6 +141,11 @@ class XGBoostClassifier (
def setCustomEval(value: EvalTrait): this.type = set(customEval, value)
def setAllowNonZeroForMissing(value: Boolean): this.type = set(
allowNonZeroForMissing,
value
)
def setSinglePrecisionHistogram(value: Boolean): this.type =
set(singlePrecisionHistogram, value)
@@ -248,7 +253,7 @@ class XGBoostClassificationModel private[ml](
def setMissing(value: Float): this.type = set(missing, value)
def setAllowZeroForMissingValue(value: Boolean): this.type = set(
def setAllowNonZeroForMissing(value: Boolean): this.type = set(
allowNonZeroForMissing,
value
)

View File

@@ -145,6 +145,11 @@ class XGBoostRegressor (
def setCustomEval(value: EvalTrait): this.type = set(customEval, value)
def setAllowNonZeroForMissing(value: Boolean): this.type = set(
allowNonZeroForMissing,
value
)
def setSinglePrecisionHistogram(value: Boolean): this.type =
set(singlePrecisionHistogram, value)
@@ -244,7 +249,7 @@ class XGBoostRegressionModel private[ml] (
def setMissing(value: Float): this.type = set(missing, value)
def setAllowZeroForMissingValue(value: Boolean): this.type = set(
def setAllowNonZeroForMissing(value: Boolean): this.type = set(
allowNonZeroForMissing,
value
)