diff options
author | Nakul Jindal <njindal@us.ibm.com> | 2015-10-28 01:02:03 -0700 |
---|---|---|
committer | DB Tsai <dbt@netflix.com> | 2015-10-28 01:02:03 -0700 |
commit | 5f1cee6f158adb1f9f485ed1d529c56bace68adc (patch) | |
tree | f06951a9ef512688ff0419cdba46f8f686a58906 /mllib/src/test/scala/org | |
parent | 82c1c5772817785709b0289f7d836beba812c791 (diff) | |
download | spark-5f1cee6f158adb1f9f485ed1d529c56bace68adc.tar.gz spark-5f1cee6f158adb1f9f485ed1d529c56bace68adc.tar.bz2 spark-5f1cee6f158adb1f9f485ed1d529c56bace68adc.zip |
[SPARK-11332] [ML] Refactored to use ml.feature.Instance instead of WeightedLeastSquare.Instance
WeightedLeastSquares now uses the common Instance class in ml.feature instead of a private one.
Author: Nakul Jindal <njindal@us.ibm.com>
Closes #9325 from nakul02/SPARK-11332_refactor_WeightedLeastSquares_dot_Instance.
Diffstat (limited to 'mllib/src/test/scala/org')
-rw-r--r-- | mllib/src/test/scala/org/apache/spark/ml/optim/WeightedLeastSquaresSuite.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mllib/src/test/scala/org/apache/spark/ml/optim/WeightedLeastSquaresSuite.scala b/mllib/src/test/scala/org/apache/spark/ml/optim/WeightedLeastSquaresSuite.scala index 652f3adb98..b542ba3dc5 100644 --- a/mllib/src/test/scala/org/apache/spark/ml/optim/WeightedLeastSquaresSuite.scala +++ b/mllib/src/test/scala/org/apache/spark/ml/optim/WeightedLeastSquaresSuite.scala @@ -18,7 +18,7 @@ package org.apache.spark.ml.optim import org.apache.spark.SparkFunSuite -import org.apache.spark.ml.optim.WeightedLeastSquares.Instance +import org.apache.spark.ml.feature.Instance import org.apache.spark.mllib.linalg.Vectors import org.apache.spark.mllib.util.MLlibTestSparkContext import org.apache.spark.mllib.util.TestingUtils._ @@ -38,10 +38,10 @@ class WeightedLeastSquaresSuite extends SparkFunSuite with MLlibTestSparkContext w <- c(1, 2, 3, 4) */ instances = sc.parallelize(Seq( - Instance(1.0, Vectors.dense(0.0, 5.0).toSparse, 17.0), - Instance(2.0, Vectors.dense(1.0, 7.0), 19.0), - Instance(3.0, Vectors.dense(2.0, 11.0), 23.0), - Instance(4.0, Vectors.dense(3.0, 13.0), 29.0) + Instance(17.0, 1.0, Vectors.dense(0.0, 5.0).toSparse), + Instance(19.0, 2.0, Vectors.dense(1.0, 7.0)), + Instance(23.0, 3.0, Vectors.dense(2.0, 11.0)), + Instance(29.0, 4.0, Vectors.dense(3.0, 13.0)) ), 2) } |