[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:
@@ -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
|
||||
)
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user