Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
wbo4958 committed Jun 14, 2024
1 parent 17bc414 commit b1c6d52
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private[spark] trait DartBoosterParams extends Params {
"procedure during a boosting iteration.\nIf a dropout is skipped, new trees are added " +
"in the same manner as gbtree.\nNote that non-zero skip_drop has higher priority than " +
"rate_drop or one_drop.",
ParamValidators.inRange(0, 0, true, true))
ParamValidators.inRange(0, 1, true, true))

final def getSkipDrop: Double = $(skipDrop)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ private[spark] trait RankerParams[T <: Params] extends HasGroupCol with NonXGBoo
private[spark] trait XGBoostParams[T <: Params] extends TreeBoosterParams
with LearningTaskParams with GeneralParams with DartBoosterParams {

// Setter for TreeBoosterParams
// Setters for TreeBoosterParams
def setEta(value: Double): T = set(eta, value).asInstanceOf[T]

def setGamma(value: Double): T = set(gamma, value).asInstanceOf[T]
Expand Down Expand Up @@ -266,7 +266,7 @@ private[spark] trait XGBoostParams[T <: Params] extends TreeBoosterParams

def setMaxCachedHistNode(value: Int): T = set(maxCachedHistNode, value).asInstanceOf[T]

// Setter for LearningTaskParams
// Setters for LearningTaskParams

def setObjective(value: String): T = set(objective, value).asInstanceOf[T]

Expand All @@ -293,6 +293,30 @@ private[spark] trait XGBoostParams[T <: Params] extends TreeBoosterParams

def setLambdarankUnbiased(value: Boolean): T = set(lambdarankUnbiased, value).asInstanceOf[T]

def setLambdarankBiasNorm(value: Double): T = set(lambdarankBiasNorm, value).asInstanceOf[T]

def setNdcgExpGain(value: Boolean): T = set(ndcgExpGain, value).asInstanceOf[T]

// Setters for Dart
def setSampleType(value: String): T = set(sampleType, value).asInstanceOf[T]

def setNormalizeType(value: String): T = set(normalizeType, value).asInstanceOf[T]

def setRateDrop(value: Double): T = set(rateDrop, value).asInstanceOf[T]

def setOneDrop(value: Boolean): T = set(oneDrop, value).asInstanceOf[T]

def setSkipDrop(value: Double): T = set(skipDrop, value).asInstanceOf[T]

// Setters for GeneralParams
def setBooster(value: String): T = set(booster, value).asInstanceOf[T]

def setDevice(value: String): T = set(device, value).asInstanceOf[T]

def setVerbosity(value: Int): T = set(verbosity, value).asInstanceOf[T]

def setValidateParameters(value: Boolean): T = set(validateParameters, value).asInstanceOf[T]

def setNthread(value: Int): T = set(nthread, value).asInstanceOf[T]


Expand Down

0 comments on commit b1c6d52

Please sign in to comment.