Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix input types, improve readability #369

Merged
merged 15 commits into from
Sep 29, 2021

Conversation

Crown421
Copy link
Member

Summary
As a follow up for the recent #354 pull request this PR changes the input signatures to prevent unintended behaviour in specialized kernelmatrix and kronecker_kernelmatrix implementations.

Proposed changes
Changing signatures to implicitly enforce same input types (Bug Fix)
Adding a doc string to kronecker_kernelmatrix

What alternatives have you considered?
None

Breaking changes
None

docs/src/api.md Outdated
@@ -88,3 +88,9 @@ kernelpdmat
nystrom
NystromFact
```

## Optional Utilities
If the [Kronecker.jl](https://github.com/MichielStock/Kronecker.jl) package is loaded, KernelFunctions also provides the following functions.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's always provided but it doesn't work without Kronecker.jl?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is in via Requires, so if I understand correctly it is not available without Kronecker.jl?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have reformulated, is it clearer now?

docs/src/api.md Outdated Show resolved Hide resolved
src/matrix/kernelkroneckermat.jl Outdated Show resolved Hide resolved
src/mokernels/intrinsiccoregion.jl Show resolved Hide resolved
Co-authored-by: Théo Galy-Fajou <theo.galyfajou@gmail.com>
Copy link
Member

@willtebbutt willtebbutt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with this PR, modulo my style-related comments, so I'm happy for this to be merged without me re-reviewing once the things being discussed with @theogf and @devmotion are resolved.

src/matrix/kernelkroneckermat.jl Outdated Show resolved Hide resolved
src/matrix/kernelkroneckermat.jl Outdated Show resolved Hide resolved
@@ -88,3 +88,12 @@ kernelpdmat
nystrom
NystromFact
```

## Conditional Utilities
To keep the dependencies of KernelFunctions lean, some functionality is only available if specific other packages are explicitly loaded (`using`).
Copy link
Member

@st-- st-- Sep 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also the case for kernelpdmat above, which requires PDMats.jl

Copy link
Member

@theogf theogf Sep 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We mentioned it should/could be done in a different PR (also to add kernelkronmat)

src/mokernels/independent.jl Outdated Show resolved Hide resolved
src/mokernels/independent.jl Outdated Show resolved Hide resolved
Crown421 and others added 2 commits September 29, 2021 13:14
Co-authored-by: st-- <st--@users.noreply.github.com>
@Crown421
Copy link
Member Author

Going to merge this later today if that is ok with everyone? I think remaining issues can be addressing in later PRs?

@Crown421 Crown421 merged commit 6e7ca17 into JuliaGaussianProcesses:master Sep 29, 2021
@Crown421 Crown421 deleted the mo-lazy-fix branch September 29, 2021 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants