Skip to content

Commit 85717c9

Browse files
authored
updating MLJBase bound and tests (#42)
* updating MLJBase bound and tests
1 parent 782c1d9 commit 85717c9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
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.2.1"
4+
version = "0.2.2"
55

66
[deps]
77
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
@@ -17,7 +17,7 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
1717
DocStringExtensions = "^0.8"
1818
IterativeSolvers = "^0.8"
1919
LinearMaps = "^2.5"
20-
MLJBase = "^0.8"
20+
MLJBase = "^0.9"
2121
Optim = "^0.19"
2222
Parameters = "^0.12"
2323
Tables = "^0.2"

test/glr/grad-hess-prox.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ end
106106
g1 = similar(θ1)
107107
H1 = zeros(p+1, p+1)
108108
f1 = fgh!(f1, g1, H1, θ1)
109-
@test f1 == J(θ1)
109+
@test f1 J(θ1)
110110
@test g1 -X1' * (y .* R.σ.(-y .* (X1 * θ1))) .+ λ .* θ1
111111
@test H1 X1' * (Diagonal(R.σ.(y .* (X1 * θ1))) * X1) + λ * I
112112

@@ -127,7 +127,7 @@ end
127127
g1 = similar(θ1)
128128
H1 = zeros(p+1, p+1)
129129
f1 = fgh!(f1, g1, H1, θ1)
130-
@test f1 == J(θ1)
130+
@test f1 J(θ1)
131131
@test g1 -X1' * (y .* R.σ.(-y .* (X1 * θ1))) .+ λ .* θ1 .* maskint
132132
@test H1 X1' * (Diagonal(R.σ.(y .* (X1 * θ1))) * X1) + λ * Diagonal(maskint)
133133
Hv! = R.Hv!(lr1, X, y)
@@ -243,7 +243,7 @@ end
243243
f1 = fgh1!(0.0, g1, H1, θ1_)
244244
r1 = X1*θ1_ .- y1
245245
mask = abs.(r1) .<= δ
246-
@test f1 == hlr1.loss(r1) + hlr1.penalty(θ1_)
246+
@test f1 hlr1.loss(r1) + hlr1.penalty(θ1_)
247247
@test g1 (X1' * (r1 .* mask)) .+ (X1' *.* sign.(r1) .* .!mask)) .+ λ .* θ1_
248248
@test H1 X1' * (mask .* X1) + λ*I
249249

@@ -266,7 +266,7 @@ end
266266
f1 = fgh1!(0.0, g1, H1, θ1_)
267267
r1 = X1*θ1_ .- y1
268268
mask = abs.(r1) .<= δ
269-
@test f1 == hlr1.loss(r1) + hlr1.penalty(θ1_ .* maskint)
269+
@test f1 hlr1.loss(r1) + hlr1.penalty(θ1_ .* maskint)
270270
@test g1 (X1' * (r1 .* mask)) .+ (X1' *.* sign.(r1) .* .!mask)) .+
271271
λ .* θ1_ .* maskint
272272
@test H1 X1' * (mask .* X1) + λ * Diagonal(maskint)

0 commit comments

Comments
 (0)