[ML-3844] Add GBTRegression benchmark (#156)

* add GBTRegression benchmark

* add GBTRegression benchmark
This commit is contained in:
ludatabricks 2018-06-27 09:17:38 -07:00 committed by Xiangrui Meng
parent e8aa132bb8
commit e9ef9788c2
3 changed files with 29 additions and 0 deletions

View File

@ -111,6 +111,11 @@ benchmarks:
- name: regression.DecisionTreeRegression
params:
depth: [5, 10]
- name: regression.GBTRegression
params:
numFeatures: 2000
depth: 5
maxIter: 5
- name: regression.GLMRegression
params:
numExamples: 500000

View File

@ -142,6 +142,12 @@ benchmarks:
depth: 3
numClasses: 4
numFeatures: 5
- name: regression.GBTRegression
params:
numExamples: 100
numTestExamples: 10
depth: 3
maxIter: 3
- name: regression.GLMRegression
params:
numExamples: 100

View File

@ -0,0 +1,18 @@
package com.databricks.spark.sql.perf.mllib.regression
import org.apache.spark.ml.PipelineStage
import org.apache.spark.ml.regression.GBTRegressor
import com.databricks.spark.sql.perf.mllib.OptionImplicits._
import com.databricks.spark.sql.perf.mllib.{BenchmarkAlgorithm, MLBenchContext,
TreeOrForestRegressor}
object GBTRegression extends BenchmarkAlgorithm with TreeOrForestRegressor {
override def getPipelineStage(ctx: MLBenchContext): PipelineStage = {
import ctx.params._
new GBTRegressor()
.setMaxDepth(depth)
.setMaxIter(maxIter)
.setSeed(ctx.seed())
}
}