(Most) Matern kernels return Float64 for Float32 inputs
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- julia
- Domain
- machine-learning
Research direction
Start in src/basekernels/matern.jl at the cited Matern kernel definitions and compare their behavior with Matern12Kernel for Float32 inputs. Run the existing test suite and add or update focused coverage so the affected kernels preserve the input precision if that is the intended behavior.
Written by the indexing model from the issue text.
Description
Hello. When I run typeof(Matern52Kernel()(Float32(1), Float32(1.1))), I get Float64. Same with Matern32Kernel, Matern72Kernel and MaternKernel. Only Matern12Kernel outputs a Float32 with Float32 inputs. Is this on purpose?
It might be stemming from, e.g., the sqrt(5) in https://github.com/JuliaGaussianProcesses/KernelFunctions.jl/blob/be3b6847bff2c2ac4e548dcc294cbe2f2864f406/src/basekernels/matern.jl#L114 which always evaluates to a Float64. Same for all the other Matern kernels affected. If it's not intentional, it seems like a simple fix.
- Dominant language
- Julia
- Stars
- 276
- Forks
- 41
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from JuliaGaussianProcesses/KernelFunctions.jl
-
Future plans?Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
JuliaGaussianProcesses/KernelFunctions.jl#585 · 8 comments · 3 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
JuliaGaussianProcesses/KernelFunctions.jl#571 · 1 reaction ·
-
new kernel
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
JuliaGaussianProcesses/KernelFunctions.jl#533 · 1 reaction ·
All issues in JuliaGaussianProcesses/KernelFunctions.jl
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
JuliaSymbolics/SymbolicUtils.jl#1131 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
JuliaMath/AbstractFFTs.jl#159 ·