diff options
author | Yanbo Liang <ybliang8@gmail.com> | 2015-11-03 08:31:16 -0800 |
---|---|---|
committer | Xiangrui Meng <meng@databricks.com> | 2015-11-03 08:31:16 -0800 |
commit | 3434572b141075f00698d94e6ee80febd3093c3b (patch) | |
tree | e25a7d4ca0ab35b41aee10965679b91ba5658e2f /mllib/src/test/scala/org/apache | |
parent | d6f10aa7ea2806c0fbcfc31d7dee91d28319fab7 (diff) | |
download | spark-3434572b141075f00698d94e6ee80febd3093c3b.tar.gz spark-3434572b141075f00698d94e6ee80febd3093c3b.tar.bz2 spark-3434572b141075f00698d94e6ee80febd3093c3b.zip |
[MINOR][ML] Fix naming conventions of AFTSurvivalRegression coefficients
Rename ```regressionCoefficients``` back to ```coefficients```, and name ```weights``` to ```parameters```.
See discussion [here](https://github.com/apache/spark/pull/9311/files#diff-e277fd0bc21f825d3196b4551c01fe5fR230). mengxr vectorijk dbtsai
Author: Yanbo Liang <ybliang8@gmail.com>
Closes #9431 from yanboliang/aft-coefficients.
Diffstat (limited to 'mllib/src/test/scala/org/apache')
-rw-r--r-- | mllib/src/test/scala/org/apache/spark/ml/regression/AFTSurvivalRegressionSuite.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mllib/src/test/scala/org/apache/spark/ml/regression/AFTSurvivalRegressionSuite.scala b/mllib/src/test/scala/org/apache/spark/ml/regression/AFTSurvivalRegressionSuite.scala index c0f791bce1..359f310271 100644 --- a/mllib/src/test/scala/org/apache/spark/ml/regression/AFTSurvivalRegressionSuite.scala +++ b/mllib/src/test/scala/org/apache/spark/ml/regression/AFTSurvivalRegressionSuite.scala @@ -141,12 +141,12 @@ class AFTSurvivalRegressionSuite extends SparkFunSuite with MLlibTestSparkContex Number of Newton-Raphson Iterations: 5 n= 1000 */ - val regressionCoefficientsR = Vectors.dense(-0.039) + val coefficientsR = Vectors.dense(-0.039) val interceptR = 1.759 val scaleR = 1.41 assert(model.intercept ~== interceptR relTol 1E-3) - assert(model.regressionCoefficients ~== regressionCoefficientsR relTol 1E-3) + assert(model.coefficients ~== coefficientsR relTol 1E-3) assert(model.scale ~== scaleR relTol 1E-3) /* @@ -212,12 +212,12 @@ class AFTSurvivalRegressionSuite extends SparkFunSuite with MLlibTestSparkContex Number of Newton-Raphson Iterations: 5 n= 1000 */ - val regressionCoefficientsR = Vectors.dense(-0.0844, 0.0677) + val coefficientsR = Vectors.dense(-0.0844, 0.0677) val interceptR = 1.9206 val scaleR = 0.977 assert(model.intercept ~== interceptR relTol 1E-3) - assert(model.regressionCoefficients ~== regressionCoefficientsR relTol 1E-3) + assert(model.coefficients ~== coefficientsR relTol 1E-3) assert(model.scale ~== scaleR relTol 1E-3) /* @@ -282,12 +282,12 @@ class AFTSurvivalRegressionSuite extends SparkFunSuite with MLlibTestSparkContex Number of Newton-Raphson Iterations: 6 n= 1000 */ - val regressionCoefficientsR = Vectors.dense(0.896, -0.709) + val coefficientsR = Vectors.dense(0.896, -0.709) val interceptR = 0.0 val scaleR = 1.52 assert(model.intercept === interceptR) - assert(model.regressionCoefficients ~== regressionCoefficientsR relTol 1E-3) + assert(model.coefficients ~== coefficientsR relTol 1E-3) assert(model.scale ~== scaleR relTol 1E-3) /* |