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

Correct bracket for exponential #814

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

wreise
Copy link
Collaborator

@wreise wreise commented Feb 13, 2023

This PR aims to fix two issues noticed after #755 :

  • Incorrect bracket in exponential makes tests pass almost always.
  • Many lines are marked as tested only because they are covered by src/python/example/diagram_vectorizations_distances_kernels.py.

@wreise wreise marked this pull request as ready for review March 2, 2023 09:16
src/python/test/test_representations.py Outdated Show resolved Hide resolved
src/python/test/test_representations.py Outdated Show resolved Hide resolved
@wreise
Copy link
Collaborator Author

wreise commented Mar 6, 2023

After fixing @mglisse 's comments, now the tests crash (at least locally): the approximation seems to be not that good. I will have a closer look.

@mglisse mglisse marked this pull request as draft March 23, 2023 10:04
@wreise wreise marked this pull request as ready for review October 17, 2023 06:05
@wreise
Copy link
Collaborator Author

wreise commented Oct 17, 2023

The approximation with RBFSampler is consistent if
PersistenceWeightedGaussianKernel(bandwidth, weight_fct)(dgm1, dgm2) is equal to the expectation of PersistenceWeightedGaussianKernel(bandwidth, weight_fct, kernel_approx=RBFSampler(gamma=gamma))(dgm1, dgm2). It is actually the case only when gamma = 0.5*1./(bandwidth**2).
Would it be useful to mention that somewhere (or to even restrict the API to force consistency)?

@MathieuCarriere
Copy link
Collaborator

Sorry for taking so long to answer. I am not so sure about restricting the API, given that RBFSampler is also used to approximate other kernels (I think). But it would definitely be good to add a comment about this in the doc of PersistenceWeightedGaussianKernel!

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.

3 participants