Skip to content

Commit 2dc0dc5

Browse files
committed
hot fix
1 parent 4f8e799 commit 2dc0dc5

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MLJLinearModels"
22
uuid = "6ee0df7b-362f-4a72-a706-9e79364fb692"
33
authors = ["Thibaut Lienart <[email protected]>"]
4-
version = "0.3.5"
4+
version = "0.3.6"
55

66
[deps]
77
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"

src/mlj/interface.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ function MMI.fit(m::Union{CLF_MODELS...}, verb::Int, X, y)
4545
sch = MMI.schema(X)
4646
features = (sch === nothing) ? nothing : sch.names
4747
yplain = convert.(Int, MMI.int(y))
48-
classes = MMI.classes(y[1])[unique(yplain)]
48+
decoder = MMI.decoder(y[1])
49+
classes = decoder(sort(unique(yplain)))
4950
nclasses = length(classes)
5051
if nclasses == 2
5152
# recode

test/fit/robust.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ end
9696
@test isapprox(J(θ_iwls), 0.818677, rtol=1e-4)
9797
end
9898

99-
@testset "LogisticRReg" begin
99+
@testset "LogisticReg" begin
100100
δ = 1.5
101101
λ = 1.0
102102
rr = RobustRegression(rho=Logistic(delta=δ), lambda=λ, penalize_intercept=true)

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using MLJLinearModels, Test, LinearAlgebra, Random, StableRNGs
22
import MLJBase # not MLJModelInterface, to mimic the full interface
33

4-
DO_COMPARISONS = false; include("testutils.jl")
4+
DO_COMPARISONS = true; include("testutils.jl")
55

66
m("UTILS"); include("utils.jl")
77

0 commit comments

Comments
 (0)