Skip to content

Conversation

@jakubwro
Copy link
Collaborator

@jakubwro jakubwro commented Jan 5, 2020

I implemented 1D case of FNT deconvolution what partially solves #2 I'll update docs if it makes sense.
The biggest limitation of this method is that each element of H matrix needs to have inverse, what is hard to achieve for real data, so I'm not sure if Deconvolution.jl is good place for algorithms like this.

@jakubwro
Copy link
Collaborator Author

jakubwro commented Jan 5, 2020

Build fails cause this PR is not merged yet JuliaRegistries/General#7482

h = [3, 2, 0, 0]
y = [3, 5, 3, 0]
x = fermat(y, h, 4, 17)
@test Circulant(h) * x == y
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Circular convolution again, it uses the same fft approach as above
https://github.com/JuliaMatrices/SpecialMatrices.jl/blob/master/src/toeplitz.jl#L54

I have feeling that we need some package with better api to perform convolution. I don't like the fact that floating point arithmetic is used here.

Copy link
Member

Choose a reason for hiding this comment

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

It looks like you have a plan 🙂

Copy link
Member

@giordano giordano left a comment

Choose a reason for hiding this comment

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

The biggest limitation of this method is that each element of H matrix needs to have inverse, what is hard to achieve for real data, so I'm not sure if Deconvolution.jl is good place for algorithms like this.

While currently implemented methods are probably easier to use in practice, I don't see why this would be a problem for including this method here 😉

h = [3, 2, 0, 0]
y = [3, 5, 3, 0]
x = fermat(y, h, 4, 17)
@test Circulant(h) * x == y
Copy link
Member

Choose a reason for hiding this comment

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

It looks like you have a plan 🙂

xm = ifnt(H_inv .* fnt(convolved, g, q), g, q)
x0 = mod.(Dm * xm, q)
x0[x0 .>= bias] .-= q
x = x0
Copy link
Member

Choose a reason for hiding this comment

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

x will be exactly the same thing as x0, this means that chaning x0 will have the same effect on x and vice versa. Is this what you want?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, this assignment is just to follow variable naming form the paper, x0 is not modified later, and new variable xj is introduced later int the loop.

@codecov-io
Copy link

codecov-io commented Jan 6, 2020

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (7af04b8) to head (43c47b1).
Report is 10 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #14   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         4    +1     
  Lines           25        48   +23     
=========================================
+ Hits            25        48   +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jakubwro
Copy link
Collaborator Author

jakubwro commented Jan 6, 2020

@giordano build is green, but please do not merge yet, I need to add docs and replace fft with precise integer convolution. To do that I think I will start a new project for integer DSP algorithms.

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