Implementing basic RQA functionality#15
Merged
zeyus merged 14 commits intoNexusDynamic:devfrom Mar 8, 2024
Merged
Conversation
zeyus
requested changes
Mar 7, 2024
Contributor
zeyus
left a comment
There was a problem hiding this comment.
Minor things but this is awesome 😎
| self._metadata[k] = v | ||
| else: | ||
| # Metadata entry for an existing key: append values to the list | ||
| self._metadata[k] += v |
| v_sum = d_line_dist[lmin:].sum() | ||
| avg_vert_length = (v_line_dist[lmin:] * np.arange(msize+1)[lmin:]).sum() / v_sum if v_sum > 0 else 0 | ||
|
|
||
| d_line_dist[lmin:] > 0 |
| d_probs /= d_probs.sum() | ||
| d_entropy = -(d_probs * np.log(d_probs)).sum() | ||
|
|
||
| v_line_dist[lmin:] > 0 |
| return x.interpolate(method="linear") | ||
|
|
||
|
|
||
| def calc_rqa(x: np.array, y: np.array, dim: int = 1, tau: int = 1, threshold: float = 0.1, lmin: int = 2): |
Contributor
There was a problem hiding this comment.
This could maybe go into mopipe.core somewhere?
zeyus
reviewed
Mar 7, 2024
Contributor
|
I'll have to revisit the documentation generation, now that we are getting to the meat of the code it should break it out a bit more for the API documentation (like "stuff you want to use as a user of mopipe" / " base structures and internal stuff you can build from in mopipe") but we can discuss what makes the most sense...I think it should be as automated as possible, but a bit more structured than the huge list of classes there now. |
Closed
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.
This is the implementation of a basic RQA analysis fitting the Mopipe architecture.
New Segments:
Bugfixes: