Skip to content

Commit

Permalink
do svm and ranger Pt.7
Browse files Browse the repository at this point in the history
  • Loading branch information
thierrymoudiki committed Jan 18, 2024
1 parent 009e4b1 commit d705e84
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ using Test

y = [1,2,3,4,5,6,7,8,9,10]
z = rand(8, 2)
u = rand(50)

#@testset "----- Testing armagarchf -----" begin
# y = rand(25)
Expand All @@ -29,16 +30,16 @@ using Test
end

@testset "----- Testing dynrmf (svm) -----" begin
val = Ahead.dynrmf(y, h=6, method="svm", kernel="linear")
val = Ahead.dynrmf(u, h=6, method="svm", kernel="linear")
println(val)
@test isapprox(round(val[:residuals][1]), 0)
#@test isapprox(round(val[:residuals][1]), 0)
@test val[:x] == y
end

@testset "----- Testing dynrmf (ranger) -----" begin
val = Ahead.dynrmf(y, h=6, method="randomforest", num_trees=50)
val = Ahead.dynrmf(u, h=6, method="randomforest", num_trees=50)
println(val)
@test isapprox(round(val[:residuals][1]), 0)
#@test isapprox(round(val[:residuals][1]), 0)
@test val[:x] == y
end

Expand Down

0 comments on commit d705e84

Please sign in to comment.