Skip to content

Commit

Permalink
revert setVarianceCol to avoid mima
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengruifeng committed Aug 21, 2019
1 parent 8247395 commit 4eb97be
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Expand Up @@ -100,6 +100,10 @@ class DecisionTreeRegressor @Since("1.4.0") (@Since("1.4.0") override val uid: S
@Since("1.6.0")
def setSeed(value: Long): this.type = set(seed, value)

/** @group setParam */
@Since("2.0.0")
def setVarianceCol(value: String): this.type = set(varianceCol, value)

/**
* Sets the value of param [[weightCol]].
* If this is not set or empty, we treat all instance weights as 1.0.
Expand Down Expand Up @@ -182,6 +186,9 @@ class DecisionTreeRegressionModel private[ml] (
extends PredictionModel[Vector, DecisionTreeRegressionModel]
with DecisionTreeModel with DecisionTreeRegressorParams with MLWritable with Serializable {

/** @group setParam */
def setVarianceCol(value: String): this.type = set(varianceCol, value)

require(rootNode != null,
"DecisionTreeRegressionModel given null rootNode, but it requires a non-null rootNode.")

Expand Down
Expand Up @@ -293,9 +293,6 @@ private[ml] trait TreeRegressorParams extends HasVarianceImpurity
private[ml] trait DecisionTreeRegressorParams extends DecisionTreeParams
with TreeRegressorParams with HasVarianceCol {

/** @group setParam */
final def setVarianceCol(value: String): this.type = set(varianceCol, value)

override protected def validateAndTransformSchema(
schema: StructType,
fitting: Boolean,
Expand Down

0 comments on commit 4eb97be

Please sign in to comment.