Skip to content
Permalink
Browse files

Add `is_provide_training_metric` to LightGBMRanker.

  • Loading branch information...
shishaochen authored and imatiach-msft committed May 29, 2019
1 parent ceb5291 commit 17a765e6747dca6ab0f28cce047c7068bd3c31f2
@@ -45,7 +45,8 @@ class LightGBMRanker(override val uid: String)
RankerTrainParams(getParallelism, getNumIterations, getLearningRate, getNumLeaves,
getObjective, getMaxBin, getBaggingFraction, getBaggingFreq, getBaggingSeed, getEarlyStoppingRound,
getFeatureFraction, getMaxDepth, getMinSumHessianInLeaf, numWorkers, modelStr,
getVerbosity, categoricalIndexes, getBoostingType, getLambdaL1, getLambdaL2, getMaxPosition, getLabelGain)
getVerbosity, categoricalIndexes, getBoostingType, getLambdaL1, getLambdaL2, getMaxPosition, getLabelGain,
getIsProvideTrainingMetric)
}

def getModel(trainParams: TrainParams, lightGBMBooster: LightGBMBooster): LightGBMRankerModel = {
@@ -89,9 +89,9 @@ case class RankerTrainParams(val parallelism: String, val numIterations: Int, va
val baggingSeed: Int, val earlyStoppingRound: Int, val featureFraction: Double,
val maxDepth: Int, val minSumHessianInLeaf: Double, val numMachines: Int,
val modelString: Option[String], val verbosity: Int,
val categoricalFeatures: Array[Int],
val boostingType: String, val lambdaL1: Double, val lambdaL2: Double,
val maxPosition: Int, val labelGain: Array[Double])
val categoricalFeatures: Array[Int], val boostingType: String,
val lambdaL1: Double, val lambdaL2: Double, val maxPosition: Int,
val labelGain: Array[Double], val isProvideTrainingMetric: Boolean)
extends TrainParams {
override def toString(): String = {
val labelGainStr =

0 comments on commit 17a765e

Please sign in to comment.
You can’t perform that action at this time.