Skip to content
Snippets Groups Projects
Commit 3889b1c7 authored by vectorijk's avatar vectorijk Committed by Xiangrui Meng
Browse files

[SPARK-11059] [ML] Change range of quantile probabilities in AFTSurvivalRegression

Value of the quantile probabilities array should be in the range (0, 1) instead of [0,1]
 in `AFTSurvivalRegression.scala` according to [Discussion] (https://github.com/apache/spark/pull/8926#discussion-diff-40698242)

Author: vectorijk <jiangkai@gmail.com>

Closes #9083 from vectorijk/spark-11059.
parent d0482f6a
No related branches found
No related tags found
No related merge requests found
......@@ -59,14 +59,14 @@ private[regression] trait AFTSurvivalRegressionParams extends Params
/**
* Param for quantile probabilities array.
* Values of the quantile probabilities array should be in the range [0, 1]
* Values of the quantile probabilities array should be in the range (0, 1)
* and the array should be non-empty.
* @group param
*/
@Since("1.6.0")
final val quantileProbabilities: DoubleArrayParam = new DoubleArrayParam(this,
"quantileProbabilities", "quantile probabilities array",
(t: Array[Double]) => t.forall(ParamValidators.inRange(0, 1)) && t.length > 0)
(t: Array[Double]) => t.forall(ParamValidators.inRange(0, 1, false, false)) && t.length > 0)
/** @group getParam */
@Since("1.6.0")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment