diff options
author | Liang-Chi Hsieh <viirya@gmail.com> | 2015-04-20 10:47:37 -0700 |
---|---|---|
committer | Joseph K. Bradley <joseph@databricks.com> | 2015-04-20 10:47:37 -0700 |
commit | 1ebceaa55bec28850a48fb28b4cf7b44c8448a78 (patch) | |
tree | 9b5e4e76ebdc278b077a4610de37a69cd63abb25 /examples | |
parent | 77176619a97d07811ab20e1dde4677359d85eb33 (diff) | |
download | spark-1ebceaa55bec28850a48fb28b4cf7b44c8448a78.tar.gz spark-1ebceaa55bec28850a48fb28b4cf7b44c8448a78.tar.bz2 spark-1ebceaa55bec28850a48fb28b4cf7b44c8448a78.zip |
[Minor][MLlib] Incorrect path to test data is used in DecisionTreeExample
It should load from `testInput` instead of `input` for test data.
Author: Liang-Chi Hsieh <viirya@gmail.com>
Closes #5594 from viirya/use_testinput and squashes the following commits:
5e8b174 [Liang-Chi Hsieh] Fix style.
b60b475 [Liang-Chi Hsieh] Use testInput.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/src/main/scala/org/apache/spark/examples/ml/DecisionTreeExample.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/src/main/scala/org/apache/spark/examples/ml/DecisionTreeExample.scala b/examples/src/main/scala/org/apache/spark/examples/ml/DecisionTreeExample.scala index d4cc8dede0..921b396e79 100644 --- a/examples/src/main/scala/org/apache/spark/examples/ml/DecisionTreeExample.scala +++ b/examples/src/main/scala/org/apache/spark/examples/ml/DecisionTreeExample.scala @@ -173,7 +173,8 @@ object DecisionTreeExample { val splits: Array[RDD[LabeledPoint]] = if (testInput != "") { // Load testInput. val numFeatures = origExamples.take(1)(0).features.size - val origTestExamples: RDD[LabeledPoint] = loadData(sc, input, dataFormat, Some(numFeatures)) + val origTestExamples: RDD[LabeledPoint] = + loadData(sc, testInput, dataFormat, Some(numFeatures)) Array(origExamples, origTestExamples) } else { // Split input into training, test. |