JuliaGaussianProcesses / JuliaGaussianProcesses/KernelFunctions.jl

Fix and complete equality definitions

Open
#337 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
275
Forks
41
PR merge metrics
No merged PRs in 30d

Description

If one defines isequal one has to define hash as well since otherwise the two are not consistent. In general, if one does not care about floating point comparisons one should just define == instead of isequal since isequal falls back to ==. Here it probably would make sense to define both since it would lead to different comparisons of the kernel parameters and parameters of the transform.

Basically, most often one wants the recursive implementation in https://github.com/andrewcooke/AutoHashEquals.jl/issues/18.

Originally posted by @devmotion in https://github.com/JuliaGaussianProcesses/KernelFunctions.jl/pull/335#discussion_r666911524

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing equality definitions for kernels and transform parameters, then read the linked AutoHashEquals.jl issue and the discussion from pull request #335. Done means ==, isequal, and hash are consistent, with the intended recursive comparisons for kernel and transform parameters.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.