Skip to content

Commit

Permalink
TST: keep compact and open testParams
Browse files Browse the repository at this point in the history
  • Loading branch information
facaiy committed Mar 28, 2017
1 parent 55fe603 commit 5e0fbe3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -389,17 +389,15 @@ class DecisionTreeClassifierSuite
test("SPARK-20043: " +
"ImpurityCalculator builder fails for uppercase impurity type Gini in model read/write") {
val rdd = TreeTests.getTreeReadWriteData(sc)

val data: DataFrame =
TreeTests.setMetadata(rdd, Map.empty[Int, Int], numClasses = 2)

val dt = new DecisionTreeClassifier()
.setImpurity("Gini")
.setMaxDepth(2)

val model = dt.fit(data)

testDefaultReadWrite(model, false)
testDefaultReadWrite(model)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,17 +182,15 @@ class DecisionTreeRegressorSuite
test("SPARK-20043: " +
"ImpurityCalculator builder fails for uppercase impurity type in model read/write") {
val rdd = TreeTests.getTreeReadWriteData(sc)

val data: DataFrame =
TreeTests.setMetadata(rdd, Map.empty[Int, Int], numClasses = 0)

val dt = new DecisionTreeRegressor()
.setImpurity("Variance")
.setMaxDepth(2)

val model = dt.fit(data)

testDefaultReadWrite(model, false)
testDefaultReadWrite(model)
}
}

Expand Down

0 comments on commit 5e0fbe3

Please sign in to comment.