Draft
Conversation
…dsl into vebjorn/add-hilbert-huang
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #8 +/- ##
===========================================
- Coverage 91.22% 70.03% -21.19%
===========================================
Files 103 104 +1
Lines 3770 3958 +188
Branches 815 851 +36
===========================================
- Hits 3439 2772 -667
- Misses 207 1056 +849
- Partials 124 130 +6
|
neringaalt
reviewed
Nov 22, 2023
neringaalt
reviewed
Nov 22, 2023
neringaalt
reviewed
Nov 22, 2023
neringaalt
reviewed
Nov 22, 2023
neringaalt
reviewed
Nov 22, 2023
neringaalt
reviewed
Nov 22, 2023
neringaalt
reviewed
Nov 22, 2023
neringaalt
reviewed
Nov 23, 2023
| __all__ = ["wavelet_filter", "status_flag_filter"] | ||
| __all__ = ["hilbert_huang_transform", "wavelet_filter", "status_flag_filter"] | ||
|
|
||
| __cognite__ = ["wavelet_filter", "status_flag_filter"] |
neringaalt
reviewed
Nov 23, 2023
|
|
||
|
|
||
| def generate_synthetic_signal(): | ||
| wave = sine_wave( |
Contributor
There was a problem hiding this comment.
Add the tests that you removed, they are testing different types of signals
Contributor
There was a problem hiding this comment.
The algorithm should work with different signals
neringaalt
reviewed
Nov 23, 2023
|
|
||
| # DROP_SENTINAL is used to get the smallest (most negative) | ||
| # number that can be represented with a 32-bit signed integer. | ||
| DROP_SENTINAL = np.iinfo(np.int32).min |
Contributor
There was a problem hiding this comment.
And use it directly in the code
neringaalt
reviewed
Nov 23, 2023
| error_tolerance: float = 0.05, | ||
| return_trend: bool = True, | ||
| ) -> pd.Series: | ||
| r"""Perform the Hilbert-Huang Transform (HHT) to find the trend of a signal. |
Contributor
There was a problem hiding this comment.
You can look at the description from removed function to get some idea how to write documentation.
You dont need to explain what different type of signals are...
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.
Trend extraction by the use of the Hilbert-Huang Transform.
PROBLEM: Some of the tests fail. This could be because we're calculating the Hilbert spectrum and not the Hilbert marginal spectrum.
Description
This function extracts the trend of a signal by the use of the Hilbert-Huang Transform. This is a powerful tool in the sense that it can take any non-stationary and non-linear time series and find the trend even though there's lots of noise in the signal. The package PyEMD is used which does not have a function to find the Hilbert spectrum of the transformed signal. In order to compensate for this, a manual calculation of the Hilbert spectrum is performed. The algorithm is defined in https://wwaw.researchgate.net/publication/261234992_Trend_extraction_based_on_Hilbert-Huang_transform and it goes as follows:
Motivation and Context
It will be used to develop methods required to measure data quality.
How Has This Been Tested?
Generated synthetic signal with nonuniform timestamps, Gaussian noise and gaps, and compared with the obtained trend.
Screenshots:
Types of changes
Contributor Checklist:
fix: <description>,feat: <description>, etc.Reviewer Checklist for Charts compliant functions: