-
Notifications
You must be signed in to change notification settings - Fork 191
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
Template similarity lags #2941
Template similarity lags #2941
Conversation
for more information, see https://pre-commit.ci
@yger can we take the chance and add the L1 and L2-norms as metrics for similarity? I think this is done elsewhere already in the sortingcomponents |
for more information, see https://pre-commit.ci
…face into template_similarity_lags
@alejoe91 This has been added. The next question here (also for @samuelgarcia) is that do we want to rely on such an extension for the curation metrics ? Currently, all the methods ported from lussac are somehow duplicating code to compute distances between templates, maybe we should (if already computed) stick to the metrics of the extension? If so, I can simply add normalized_l1 as a new metric (to replace the one from Lussac) |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
All distances can now be used, and the cosine_similarity has been rename to cosine (but could be discussed). Note that various metrics are also used all over the place in the curation/lussac modules. Up to us to decide if we want to harmonize that and to make them available at this extension level. The problem is that:
|
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
This is good to go, and I've just added the metrics used in the curation modules. If this is fine for you, I could now make the curation module depends on these metrics. Note that I think that indeed, the union method is way better than the intersection, currently used in the curation. I've added docs. The only question that remains is that now, all metrics tends to return 0 when templates are similar, except the cosine, where this is 1 when they are similar. Should we consider harmonizing it? |
Thanks @yger !! Yes I think that we should.harmonize towards similarity, which is a more common concept. So equal templates would have a similarity of 1, and orthogonal of 0. For l1/l2 norm, since they are distances, it should be simply 1-dist, right? |
Ok, I'll harmonize toward similarity, ensuring that we have always 1 if template are identical. Then I'll integrate this PR into the one from meta merging and we could start playing with that |
Co-authored-by: Alessio Buccino <[email protected]>
Co-authored-by: Alessio Buccino <[email protected]>
…nd update template_comparison
…face into template_similarity_lags
@yger @samuelgarcia I moved the support/sparsity logic to the Had to fix some stuff because the |
let me read this before merging. |
Add the possibility to specify a max_lag_ms while computing the distance between templates.