From 9a3d40dbe87c99511cc30a5200c012129cf6cdf9 Mon Sep 17 00:00:00 2001 From: ExpandingMan Date: Thu, 26 Jan 2023 17:31:49 -0500 Subject: [PATCH] add tests for feature importance on regression --- test/runtests.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/runtests.jl b/test/runtests.jl index 19eadda..78b3307 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -153,6 +153,9 @@ end fit!(mach, verbosity=0) yhat = predict(mach, Xtable) + imps = feature_importances(mach) + @test Set(string.([imp[1] for imp ∈ imps])) == Set(["x1", "x2", "x3"]) + # serialize: io = IOBuffer() MLJBase.save(io, mach)