@@ -122,7 +122,7 @@ private[spark] trait SparkParams[T <: Params] extends HasFeaturesCols with HasFe
122
122
final val numWorkers = new IntParam (this , " numWorkers" , " Number of workers used to train xgboost" ,
123
123
ParamValidators .gtEq(1 ))
124
124
125
- final def getNumRound : Int = $(numRound )
125
+ final def getNumWorkers : Int = $(numWorkers )
126
126
127
127
final val forceRepartition = new BooleanParam (this , " forceRepartition" , " If the partition " +
128
128
" is equal to numWorkers, xgboost won't repartition the dataset. Set forceRepartition to " +
@@ -133,6 +133,8 @@ private[spark] trait SparkParams[T <: Params] extends HasFeaturesCols with HasFe
133
133
final val numRound = new IntParam (this , " numRound" , " The number of rounds for boosting" ,
134
134
ParamValidators .gtEq(1 ))
135
135
136
+ final def getNumRound : Int = $(numRound)
137
+
136
138
final val numEarlyStoppingRounds = new IntParam (this , " numEarlyStoppingRounds" , " Stop training " +
137
139
" Number of rounds of decreasing eval metric to tolerate before stopping training" ,
138
140
ParamValidators .gtEq(0 ))
@@ -213,14 +215,14 @@ private[spark] trait SparkParams[T <: Params] extends HasFeaturesCols with HasFe
213
215
labelCol, baseMarginCol, weightCol, predictionCol, leafPredictionCol, contribPredictionCol,
214
216
forceRepartition, featuresCols, customEval, customObj, featureTypes, featureNames)
215
217
216
- final def getNumWorkers : Int = $(numWorkers)
217
-
218
218
def setNumWorkers (value : Int ): T = set(numWorkers, value).asInstanceOf [T ]
219
219
220
220
def setForceRepartition (value : Boolean ): T = set(forceRepartition, value).asInstanceOf [T ]
221
221
222
222
def setNumRound (value : Int ): T = set(numRound, value).asInstanceOf [T ]
223
223
224
+ def setNumEarlyStoppingRounds (value : Int ): T = set(numEarlyStoppingRounds, value).asInstanceOf [T ]
225
+
224
226
def setFeaturesCol (value : Array [String ]): T = set(featuresCols, value).asInstanceOf [T ]
225
227
226
228
def setBaseMarginCol (value : String ): T = set(baseMarginCol, value).asInstanceOf [T ]
0 commit comments