Implementation of Direct Scale Transform Feature#1434
Open
dhunstack wants to merge 7 commits into
Open
Conversation
- Added parameters in header file - Added configure function - Added first order difference and matrix multiplication code Signed-off-by: Anmol Mishra <anmolmishra1997@gmail.com>
Add the following tests: - Invalid Parameters Test - Invalid Inputs Test - Zero Input Test - Regression Test to compare with original Python implementation Signed-off-by: Anmol Mishra <anmolmishra1997@gmail.com>
Member
|
Let's replace the |
dbogdanov
requested changes
Oct 17, 2024
| #include "directscaletransform.h" | ||
| #include "essentiamath.h" | ||
|
|
||
| #define FOR(i,l,r) for(int i=l; i<r; i++) |
Member
There was a problem hiding this comment.
Let's avoid using this define for clarify.
| "This code was derived from the original DST paper:\n" | ||
| "[1] Williams, W. J., and E. J. Zalubas. Helicopter transmission fault detection via " | ||
| "time-frequency, scale and spectral methods. Mechanical systems and signal processing" | ||
| "14.4 (2000): 545-559."); |
Member
There was a problem hiding this comment.
Is there some reference implementation we could additionally cite here?
| std::complex<Real> zi = std::complex<Real>(0, 1); | ||
| Real step = M_PI/log(N+1); | ||
| int num_rows = _C/step+1; // Number of rows. +1 because need to include the first row which is the 0th multiple of step | ||
| int P = matrix[0].size(); |
Member
There was a problem hiding this comment.
There's no guarantee on the consistency of the size of inner vectors, because we are using vector of vectors. Therefore, this should be checked.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[feat] Complete Implementation of Direct Scale Transform
[feat] Add tests for Direct Scale Transform
Add the following tests: