- Notifications
You must be signed in to change notification settings - Fork 339
[WIP] Add Tutorial and Derivations Notebooks for VALMOD #585#586
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
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Conversation
NimaSarajpoor commented Apr 6, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
NimaSarajpoor commented Apr 6, 2022
@seanlaw |
NimaSarajpoor commented Apr 6, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
I had a miscalculation. Although there is a typo in the paper, it seems the eq(2) of paper is correct. I fixed the typo of paper when I was doing calculation. However, I had a miscalculation somewhere else...so I corrected it and I got the eq(2)... for |
codecov-commenter commented Apr 6, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Codecov ReportPatch and project coverage have no change.
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@## main #586 +/- ## ======================================= Coverage 99.24% 99.24% ======================================= Files 82 82 Lines 12956 12956 ======================================= Hits 12858 12858 Misses 98 98 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
NimaSarajpoor commented Apr 7, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Notebook is ready. The notebook covers the first 12 pages of VALMOD_2020 paper. I FIXed my miscalculation and things are good! I also implemented the Low-Bound distance profile function for now to see how it performs (we may use it later in VALMOD algorithm). |
NimaSarajpoor commented Apr 9, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Just wanted to let you know that you can ignore the function '_calc_LB_dist_profile' at the end of notebook (it is working..but I think it is not clean. I may probably remove it as VALMOD algorithm does not use such function. I just created it to get Lower-Bound of distance profile for now to show the result) |
seanlaw commented Apr 9, 2022
I will first need to go over the initial 12 pages myself and then I will review the notebook :) |
seanlaw commented Apr 10, 2022
@NimaSarajpoor I've gone over your notebook quickly but haven't verified the derivation. Usually, with derivations, I like to write things out fully without skipping any steps (see https://github.com/TDAmeritrade/stumpy/blob/main/docs/Matrix_Profile_Derivation.ipynb). Some of your equations don't seem to be rendering for me and it's a bit hard for me to follow. I can try to find some time to work through the derivation to verify your work if that's helpful? |
NimaSarajpoor commented Apr 10, 2022
I see. Please let me re-write it. I will try to follow the same approach/style you used in the link you provided. I will check ReviewNB and if it is rendered well, I will let you know. Sounds good? |
seanlaw commented Apr 10, 2022
Yes, that would be great! Personally, I think writing out the derivation clearly will help (me) and others reduce any doubt in understanding. Also, I find that it provides an opportunity to help maintain consistency in the code regarding variable names. |
NimaSarajpoor commented Apr 11, 2022
Weird...still not rendering well.... please let me do some investigation on my end to see what's going on... |
NimaSarajpoor commented Apr 11, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@seanlaw I guess you wrote the notebooks on your end and pushed them to the repo...and things were good when rendered locally in .ipynb. Did you, by any chance, try to check your notebooks via ReviewerNB of Github? It seems the problem is related to the ReviewerNB of Github. I enclosed the math equations with |
NimaSarajpoor commented Apr 11, 2022
@seanlaw |
seanlaw commented Apr 11, 2022
Sounds good |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
seanlaw commented Apr 11, 2022
Apologies, these comments are for an older commit. I forgot to hit "Finish Review" along with my last comment. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
seanlaw commented Apr 11, 2022
@NimaSarajpoor I provided some comments and stopped at the "Expanding (3)" line |
NimaSarajpoor commented Apr 11, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@seanlaw
I found two of those comments in the ReviewNB. Maybe they got mixed together (?). I will address those two comments and then I ignore/resolve the rest. Please let me know if I miss anything. |
NimaSarajpoor commented Apr 12, 2022
I think we are all set. I can push commits after revising the notebook. |
NimaSarajpoor commented Apr 25, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@seanlaw
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Fix typos - replace variable name n with k
NimaSarajpoor commented Apr 27, 2022
So, should I now go and study |
seanlaw commented Apr 27, 2022
@NimaSarajpoor Yes, I also added a new issue #592 where we can discuss it in more detail |
NimaSarajpoor commented Jun 22, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
A couple of notes that are confirmed by the main author of VALMOD:
(This is to make sure that we do not lose this information later) |
seanlaw commented Jan 31, 2023
We've come along way @NimaSarajpoor! I wonder how easy/hard it would be to implement VALMOD now that we have top-k nearest neighbors? |
NimaSarajpoor commented Feb 1, 2023 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
We have indeed!
I took a quick look at the paper. I don't remember the details but I think the first four algorithms are the core ones. The first two algorithms are easy. The third one is already done (the top-k feature added to STUMPY). In my opinion, the main remaining task is algorithm 4. I think its implementation should be straightforward. |
NimaSarajpoor commented Mar 7, 2023 • edited by seanlaw
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by seanlaw
Uh oh!
There was an error while loading. Please reload this page.
I think the algorithm presented in a paper has a flaw. (I sent an email to the main author and am waiting for his response.) In the page14 of the paper, the following can be read:
Let's assume It is also possible that the author is aware of this, and considered it in other algorithms provided in the paper, like the ones presented for discovering motifs / discords. In other words, the aforementioned paragraph might just be written badly. |
NimaSarajpoor commented Jan 3, 2026 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
The author,
As a side: |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
NimaSarajpoor commented Jan 19, 2026
I've made major changes to the notebook to improve a few things: (1) The tutorial notebook (in this PR) was overloaded with lots of information. Although VALMOD paper defines different problems, I think it makes sense to just start with one problem and then add the others later. I've decided to focus on the first problem (see below) and revise the notebook by pruning the unnecessary information.
(2) The core idea behind VALMOD is the Lower Bound value that can be calculated for the distance between (3) It was not easy to understand what each function does. I tried to break down the process into smaller pieces. For a given
(4) Regarding:
The Algorithm 4: ComputeSubMP uses condition to check whether it is faster to compute full matrix profile, or just apply MASS for those subsequences whose matrix profile value is not exact. For now, I've decided to not consider the MASS approach as it might be slower than MATLAB's MASS. Addressing issue #1111 should improve the performance of sliding-dot-product, and, subsequently, the performance of MASS. |
This notebook addresses issue #585. In this notebook, we would like to implement the VALMOD method proposed in VALMOD_2018 and VALMOD_2020.
What I have done so far:
np.random.uniformtime series data.For now, I calculated LB given
q>0(see eq(2) in paper.) However, we still need to find LB whenq <= 0.