Skip to content

Commit

Permalink
[Minor][MLlib] Incorrect path to test data is used in DecisionTreeExa…
Browse files Browse the repository at this point in the history
…mple

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.
  • Loading branch information
viirya authored and jkbradley committed Apr 20, 2015
1 parent 7717661 commit 1ebceaa
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1ebceaa

Please sign in to comment.