KernelFunctions.jl icon indicating copy to clipboard operation
KernelFunctions.jl copied to clipboard

Add `KernelTensorSum`

Open martincornejo opened this issue 1 year ago • 10 comments

Adressess https://github.com/JuliaGaussianProcesses/KernelFunctions.jl/issues/506. Implements a new kernel composition KernelTensorSum and related operator.

The naming should be discussed since the meaning of KernelTensorSum might not be appropriate. Suggestions are welcome.

martincornejo avatar May 10 '23 07:05 martincornejo

Codecov Report

Patch coverage has no change and project coverage change: -29.38 :warning:

Comparison is base (ef6d459) 94.16% compared to head (598fbc7) 64.78%.

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #507       +/-   ##
===========================================
- Coverage   94.16%   64.78%   -29.38%     
===========================================
  Files          52       53        +1     
  Lines        1387     1414       +27     
===========================================
- Hits         1306      916      -390     
- Misses         81      498      +417     
Impacted Files Coverage Δ
src/KernelFunctions.jl 100.00% <ø> (ø)
src/kernels/kerneltensorsum.jl 0.00% <0.00%> (ø)
src/kernels/overloads.jl 16.66% <ø> (-83.34%) :arrow_down:

... and 28 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar May 10 '23 08:05 codecov[bot]

The failing tests introduced with Julia 1.9 are not related to the new Kernel. How should I proceed?

martincornejo avatar May 17 '23 17:05 martincornejo

I've renamed KernelTensorSum to KernelIndependentSum since in my opinion it better informs what it is. I could also revert this commit, do you have any opinions on the naming?

martincornejo avatar May 17 '23 17:05 martincornejo

Hi, is there anything holding this PR? Let me know if I should do anything more from my side. Thanks!

martincornejo avatar May 31 '23 07:05 martincornejo

I would have chosen KernelTensorSum, for consistency with KernelTensorProduct, similar to how we use the names KernelSum/KernelProduct. But I don't have a strong opinion.

devmotion avatar May 31 '23 07:05 devmotion

Sorry for not getting around to reviewing this.

I've renamed KernelTensorSum to KernelIndependentSum since in my opinion it better informs what it is. I could also revert this commit, do you have any opinions on the naming?

Could you elaborate on why this is a better name? This actually does worry me, because I value consistency with KernelTensorProduct.

willtebbutt avatar May 31 '23 08:05 willtebbutt

I would have chosen KernelTensorSum, for consistency with KernelTensorProduct, similar to how we use the names KernelSum/KernelProduct. But I don't have a strong opinion.

Could you elaborate on why this is a better name? This actually does worry me, because I value consistency with KernelTensorProduct.

That was my initial idea as well, but without the context of KernelTensorProduct, it is difficult to understand what KernelTensorSum is in itself. Also, is the use of the term "tensor sum" used properly in this context? If not, we would be trading off consistency for "formal correctness".

But I'm completely open about this, both are valid alternatives. I'll leave the decision up to you.

martincornejo avatar May 31 '23 08:05 martincornejo

That's fair. I agree that I'm not entirely sure that the use of the term is correct, but I still think my preference is consistency + an issue suggesting that both be renamed when we next create a breaking change / a proposal to deprecate the tensor names.

willtebbutt avatar May 31 '23 09:05 willtebbutt

I only found one reference to the term "Tensor sum" here: https://www.degruyter.com/document/doi/10.1515/spma-2019-0009/html?lang=en

theogf avatar May 31 '23 13:05 theogf

The term "tensor sum" is also used in this proposal: https://github.com/JuliaLang/julia/issues/13333 (even though arguably "direct sum" is more common - but not always synonymous: https://github.com/JuliaLang/julia/issues/13333#issuecomment-143825995)

devmotion avatar May 31 '23 18:05 devmotion