Skip to content

Commit a44f455

Browse files
authored
Fix tests (#215)
* Fix tests * Update Project.toml
1 parent 9ba1d6a commit a44f455

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "KernelFunctions"
22
uuid = "ec8451be-7e33-11e9-00cf-bbf324bd1392"
3-
version = "0.8.9"
3+
version = "0.8.10"
44

55
[deps]
66
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"

test/mokernels/slfm.jl

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
x2 = MOInput([rand(rng, in_dim) for _ in 1:N], out_dim)
99

1010
k = LatentFactorMOKernel(
11-
[MaternKernel(), SqExponentialKernel(), FBMKernel()],
11+
[Matern32Kernel(), SqExponentialKernel(), FBMKernel()],
1212
IndependentMOKernel(GaussianKernel()),
1313
rand(rng, out_dim, 3),
1414
)
@@ -23,15 +23,15 @@
2323
@test string(k) == "Semi-parametric Latent Factor Multi-Output Kernel"
2424
@test repr("text/plain", k) == (
2525
"Semi-parametric Latent Factor Multi-Output Kernel\n\tgᵢ: " *
26-
"Matern Kernel (ν = 1.5)\n\t\tSquared Exponential Kernel\n" *
26+
"Matern 3/2 Kernel\n\t\tSquared Exponential Kernel\n" *
2727
"\t\tFractional Brownian Motion Kernel (h = 0.5)\n\teᵢ: " *
2828
"Independent Multi-Output Kernel\n\tSquared Exponential Kernel"
2929
)
3030

3131
# AD test
3232
function test_slfm(A::AbstractMatrix, x1, x2)
3333
k = LatentFactorMOKernel(
34-
[MaternKernel(), SqExponentialKernel(), FBMKernel()],
34+
[Matern32Kernel(), SqExponentialKernel(), FBMKernel()],
3535
IndependentMOKernel(GaussianKernel()),
3636
A,
3737
)
@@ -40,8 +40,7 @@
4040

4141
a = rand()
4242
@test all(
43-
FiniteDifferences.j′vp(FDM, test_slfm, a, k.A, x1[1][1], x2[1][1]) .≈
43+
FiniteDifferences.j′vp(FDM, test_slfm, a, k.A, x1[1][1], x2[1][1]) .≈
4444
Zygote.pullback(test_slfm, k.A, x1[1][1], x2[1][1])[2](a)
45-
)
46-
45+
)
4746
end

0 commit comments

Comments
 (0)