Skip to content

Commit 3569b57

Browse files
st--github-actions[bot]
authored andcommitted
Apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 0c76b7a commit 3569b57

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

examples/train-kernel-parameters/script.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ plot!(x_test, sinc; lab="true function")
3232
# To train the kernel parameters via ForwardDiff.jl
3333
# we need to create a function creating a kernel from an array
3434

35-
kernelcall(θ) = (exp(θ[1]) * SqExponentialKernel() + exp(θ[2]) * Matern32Kernel()) ScaleTransform(exp(θ[3]))
35+
function kernelcall(θ)
36+
return (exp(θ[1]) * SqExponentialKernel() + exp(θ[2]) * Matern32Kernel())
37+
ScaleTransform(exp(θ[3]))
38+
end
3639

3740
# From theory we know the prediction for a test set x given
3841
# the kernel parameters and normalization constant

0 commit comments

Comments
 (0)