[ML-3869] Make Quantilediscretizer work with spark-2.3 (#154)

Add setOutputCol for Quantilediscretizer so that it works for spark-2.3.

The code has been manually tested by change the spark version.
This commit is contained in:
ludatabricks 2018-06-13 15:19:52 -07:00 committed by Joseph Bradley
parent 51786921a6
commit a4e1c790ba
2 changed files with 2 additions and 0 deletions

View File

@ -31,6 +31,7 @@ object QuantileDiscretizer extends BenchmarkAlgorithm with TestFromTraining with
import ctx.params._
new ml.feature.QuantileDiscretizer()
.setInputCol(inputCol)
.setOutputCol(outputCol)
.setNumBuckets(bucketizerNumBuckets)
.setRelativeError(relativeError)
}

View File

@ -3,4 +3,5 @@ package com.databricks.spark.sql.perf.mllib.feature
/** Trait defining common state/methods for featurizers taking a single input col */
private[feature] trait UnaryTransformer {
private[feature] val inputCol = "inputCol"
private[feature] val outputCol = "outputCol"
}