Skip to content

Commit f6cb413

Browse files
authored
Update README.md
Corrected example
1 parent 2765f8e commit f6cb413

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ The aim is to make the API as model-agnostic as possible while still being user-
1414
X = reshape(collect(range(-3.0,3.0,length=100)),:,1)
1515
# Set simple scaling of the data
1616
k₁ = SqExponentialKernel(1.0)
17-
K₁ = kernelmatrix(k,X,obsdim=1)
17+
K₁ = kernelmatrix(k,X,obsdim=1)
1818

1919
# Set a function transformation on the data
2020
k₂ = MaternKernel(FunctionTransform(x->sin.(x)))
21-
K₂ = kernelmatrix(k,X,obsdim=1)
21+
K₂ = kernelmatrix(k,X,obsdim=1)
2222

2323
# Set a matrix premultiplication on the data
24-
k₃ = PolynomialKernel(LowRankTransform(randn(4,1)),0.0,2.0)
25-
K₃ = kernelmatrix(k,X,obsdim=1)
24+
k₃ = PolynomialKernel(LowRankTransform(randn(4,1)),2.0,0.0)
25+
K₃ = kernelmatrix(k,X,obsdim=1)
2626

2727
# Add and sum kernels
2828
k₄ = 0.5*SqExponentialKernel()*LinearKernel(0.5) + 0.4*k₂
29-
K₄ = kernelmatrix(k,X,obsdim=1)
29+
K₄ = kernelmatrix(k,X,obsdim=1)
3030

31-
plot(heatmap.([K₁,K₂,K₃,K₄],yflip=true,colorbar=false)...,layout=(2,2))
31+
plot(heatmap.([K₁,K₂,K₃,K₄],yflip=true,colorbar=false)...,layout=(2,2),title=["K₁" "K₂" "K₃" "K₄"])
3232
```
3333
<p align=center>
3434
<img src="docs/src/assets/heatmap_combination.png" width=400px>

0 commit comments

Comments
 (0)