From ec6c066c84ef9a9c86c1c71a772e46ace8d4e25c Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Sun, 25 Jun 2023 10:31:11 +0800 Subject: [PATCH] WIP: tweak LoG kernel value --- src/kernel.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/kernel.jl b/src/kernel.jl index efc7a28..fc456db 100644 --- a/src/kernel.jl +++ b/src/kernel.jl @@ -334,7 +334,9 @@ function LoG(σs::NTuple{N}) where N xσ = x.^2 ./ σ2 (sum(xσ./σ2) - σ2i) * exp(-sum(xσ)/2) end - [C*df(I, σ2, σ2i) for I in R] + h = [C*df(I, σ2, σ2i) for I in R] + # make the kernel sum to zero + return h .- sum(h)/length(h) end LoG(σ::Real) = LoG((σ,σ))