Skip to content
Snippets Groups Projects
Commit 1ebceaa5 authored by Liang-Chi Hsieh's avatar Liang-Chi Hsieh Committed by Joseph K. Bradley
Browse files

[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.
parent 77176619
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment