Skip to content

Commit e7f945d

Browse files
committed
Update test
1 parent 8429808 commit e7f945d

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

ext/StatsLearnModelsMLJModelInterfaceExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function SLM.predict(fmodel::SLM.FittedModel{<:MI.Model}, table)
2626
else
2727
MI.predict(model, fitresult, data...)
2828
end
29-
(; target => ŷ)
29+
(; target => ŷ) |> Tables.materializer(table)
3030
end
3131

3232
end

test/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
33
MLJ = "add582a8-e3ab-11e8-2d5e-e98b27df1bc7"
44
MLJDecisionTreeInterface = "c6f25543-311c-4c74-83dc-3ea6d1015661"
5+
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
56
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

test/runtests.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import StatsLearnModels as SLM
22
using MLJ, MLJDecisionTreeInterface
33
using DataFrames
4+
using Random
45
using Test
56

67
@testset "StatsLearnModels.jl" begin
8+
Random.seed!(123)
79
iris = DataFrame(load_iris())
810
input = iris[:, Not(:target)]
911
output = iris[:, [:target]]

0 commit comments

Comments
 (0)