Skip to content

Commit

Permalink
Changed DTRunner to load test data using same number of features as i…
Browse files Browse the repository at this point in the history
…n training data.
  • Loading branch information
jkbradley committed Oct 10, 2014
1 parent 4e88c1f commit ba567ab
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,10 @@ object DecisionTreeRunner {
// Create training, test sets.
val splits = if (params.testInput != "") {
// Load testInput.
val numFeatures = examples.take(1)(0).features.size
val origTestExamples = params.dataFormat match {
case "dense" => MLUtils.loadLabeledPoints(sc, params.testInput)
case "libsvm" => MLUtils.loadLibSVMFile(sc, params.testInput)
case "libsvm" => MLUtils.loadLibSVMFile(sc, params.testInput, numFeatures)
}
params.algo match {
case Classification => {
Expand Down

0 comments on commit ba567ab

Please sign in to comment.