Repository navigation
[WIP] Added notebook to explain the algorithm/math of overlap-add - #43
NimaSarajpoor wants to merge 22 commits into
Conversation
|
Found 1 changed notebook. Review the changes at https://app.gitnotebooks.com/stumpy-dev/sliding_dot_product/pull/43 |
|
@seanlaw |
|
Thanks @NimaSarajpoor. I will take a look |
There was a problem hiding this comment.
I haven't read through the "Option I" in detail but I do like how you're building up the story! It almost feels like we might want to add an "overarching goals"/"questions to be answered" section to the top of the document and explain why the goals/questions exist or why they are important (i.e., how are they related to the software that we are writing?) Then, when we address them, we refer back to the goals/questions and say "and now you see how this is related/solved".
At the end of the day, the document isn't only about the convolution concept. It is also about, say, "where does the 'range' come from and how/why does it change when we use a different approach?". I tend to notice that when a "smart" person has spent a long time standing knee deep in the space, everything about the topic seems obvious to them and the "connections" are clear. However, us "dumb" people need you to "state the obvious" in writing with excruciating detail (i.e., don't skip steps!) and to declare those "connections" out loud and then we will be forever grateful.
Sounds good! I will add something in the beginning to help readers understand the objectives and why they matter.
"If you can't explain it simply, you don't understand it well enough" So, whenever something isn’t clearly elaborated, I take it as a reminder to make sure that not only is the communication clear, but that I actually understand the concept well enough to explain it clearly 😅 |
|
@seanlaw |
|
@seanlaw As a side, I think the efficiency of the overlap-add method requires its own discussion. Still, I tried to add something at the end of the notebook to provide some initial ideas for later. |
|
@NimaSarajpoor I am out of town this week but will try to find some time to review next week |
seanlaw
left a comment
There was a problem hiding this comment.
@NimaSarajpoor I skimmed the document but I really, really like how thoroughly you've stepped through everything. The story is very clear (though, I haven't studied the math in detail). Eventually, I think you should be able reference different sections of this document from within your code and it will be a wonderful complementary document!
|
Update:
@seanlaw |
This is actually quite lovely to have! Thanks for including it |
|
Thanks!! For me, there are two key takeaways from this notebook: (1) A full linear convolution between two 1D arrays X and Y can be computed via circular convolution between those arrays when each is padded with zeros till their length becomes (2) Overlap-add method is like a divide-and-conquer approach. The full linear convolution is computed between one array and chunks of the other array, and then their outputs are combined. In a GIF provided in the other notebook, I showed circular convolution between an array and each chunk of another array. However, I think it is easier to visualize it using flip-and-slide approach of full linear convolution. I will add a GIF to this notebook to demonstrate that. |
(2) Overlap-add method is like a divide-and-conquer approach. The full linear convolution is computed between one array and chunks of the other array, and then their outputs are combined. It might be good to reiterate this in a Conclusion/relevant section |
I added the conclusion section to highlight the two key takeaways. In addition, I added an animation for the overlap-add part. |
|
@seanlaw A simplified version of it is provided below: And, to improve performance, we need to cover the following items: Will add this to PR #35 |
[WIP] This PR provides a notebook that explains the math behind overlap-add in convolution.