Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Oct 18, 2024
1 parent b20f4c2 commit 22c461b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test_DecisionTree.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ function test_DecisionTree()
return
end

function test_DecisionTree()
function test_DecisionTreeClassifier()
truth(x::Vector) = x[1] <= 0.5 ? -2 : (x[2] <= 0.3 ? 3 : 4)
rng = Random.MersenneTwister(1234)
features = rand(rng, 10, 2)
features = rand(rng, 100, 2)
labels = truth.(Vector.(eachrow(features)))
ml_model = DecisionTree.DecisionTreeClassifier(; max_depth = 3)
DecisionTree.fit!(ml_model, features, labels)
Expand Down

0 comments on commit 22c461b

Please sign in to comment.