@@ -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 ))
@@ -216,14 +218,14 @@ private[spark] trait SparkParams[T <: Params] extends HasFeaturesCols with HasFe
216
218
labelCol, baseMarginCol, weightCol, predictionCol, leafPredictionCol, contribPredictionCol,
217
219
forceRepartition, featuresCols, customEval, customObj, featureTypes, featureNames)
218
220
219
- final def getNumWorkers : Int = $(numWorkers)
220
-
221
221
def setNumWorkers (value : Int ): T = set(numWorkers, value).asInstanceOf [T ]
222
222
223
223
def setForceRepartition (value : Boolean ): T = set(forceRepartition, value).asInstanceOf [T ]
224
224
225
225
def setNumRound (value : Int ): T = set(numRound, value).asInstanceOf [T ]
226
226
227
+ def setNumEarlyStoppingRounds (value : Int ): T = set(numEarlyStoppingRounds, value).asInstanceOf [T ]
228
+
227
229
def setFeaturesCol (value : Array [String ]): T = set(featuresCols, value).asInstanceOf [T ]
228
230
229
231
def setBaseMarginCol (value : String ): T = set(baseMarginCol, value).asInstanceOf [T ]
0 commit comments