[jvm-packages] unify setFeaturesCol API for XGBoostRegressor (#7784)

This commit is contained in:
Bobby Wang
2022-04-05 13:35:33 +08:00
committed by GitHub
parent e5ab8f3ebe
commit 2454407f3a
4 changed files with 13 additions and 11 deletions

View File

@@ -150,7 +150,7 @@ class XGBoostRegressor (
* This API is only used in GPU train pipeline of xgboost4j-spark-gpu, which requires
* all feature columns must be numeric types.
*/
def setFeaturesCols(value: Array[String]): this.type =
def setFeaturesCol(value: Array[String]): this.type =
set(featuresCols, value)
// called at the start of fit/train when 'eval_metric' is not defined
@@ -257,7 +257,7 @@ class XGBoostRegressionModel private[ml] (
* This API is only used in GPU train pipeline of xgboost4j-spark-gpu, which requires
* all feature columns must be numeric types.
*/
def setFeaturesCols(value: Array[String]): this.type =
def setFeaturesCol(value: Array[String]): this.type =
set(featuresCols, value)
/**