-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the dE method for AMBER #300
Merged
orbeckst
merged 8 commits into
master
from
299-the-de-method-in-decorrelating-the-u_nk-data-is-not-actually-de
Mar 21, 2023
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
f1504a9
update
xiki-tempula 57c2fbb
update
xiki-tempula a0839ed
update
xiki-tempula f47939e
Update CHANGES
xiki-tempula 5263ed4
Update subsampling.py
xiki-tempula 056d90f
Update subsampling.py
xiki-tempula 07ae088
Update subsampling.py
xiki-tempula 1d0c750
Update CHANGES
xiki-tempula File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -153,6 +153,9 @@ def u_nk2series(df, method="dE"): | |
|
||
|
||
.. versionadded:: 1.0.0 | ||
.. versionchanged:: 2.0.1 | ||
The `dE` method computes the difference between the current lambda | ||
and the next lambda (previous lambda for the last window). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add "... instead of ..." so that people have an idea what behavior changed |
||
|
||
""" | ||
|
||
|
@@ -196,11 +199,13 @@ def u_nk2series(df, method="dE"): | |
# For the case of more than 1 lambda | ||
index = df.columns.values.tolist().index(key) | ||
# for the state that is not the last state, take the state+1 | ||
current_lambda = df.iloc[:, index] | ||
if index + 1 < len(df.columns): | ||
series = df.iloc[:, index + 1] | ||
new_lambda = df.iloc[:, index + 1] | ||
# for the state that is the last state, take the state-1 | ||
else: | ||
series = df.iloc[:, index - 1] | ||
new_lambda = df.iloc[:, index - 1] | ||
series = new_lambda - current_lambda | ||
else: | ||
raise ValueError("Decorrelation method {} not found.".format(method)) | ||
return series | ||
|
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you be more specific what bug was fixed — instead of the word "Change", something like "fixed to now use .... (note: will lead to different results than before) (issue ....)"
If I am a user and look through CHANGES I would want to understand if anything affects me.