Skip to content

Commit 1ebceaa

Browse files
viiryajkbradley
authored andcommitted
[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.
1 parent 7717661 commit 1ebceaa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/src/main/scala/org/apache/spark/examples/ml/DecisionTreeExample.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ object DecisionTreeExample {
173173
val splits: Array[RDD[LabeledPoint]] = if (testInput != "") {
174174
// Load testInput.
175175
val numFeatures = origExamples.take(1)(0).features.size
176-
val origTestExamples: RDD[LabeledPoint] = loadData(sc, input, dataFormat, Some(numFeatures))
176+
val origTestExamples: RDD[LabeledPoint] =
177+
loadData(sc, testInput, dataFormat, Some(numFeatures))
177178
Array(origExamples, origTestExamples)
178179
} else {
179180
// Split input into training, test.

0 commit comments

Comments
 (0)