Skip to content

Use identical RNG state across RANSAC runs when matlab_strict enabled - #89

Merged
sappelhoff merged 3 commits into
sappelhoff:masterfrom
a-hurst:matlab_consistent_seed_state
Jun 17, 2021
Merged

sappelhoff merged 3 commits into
sappelhoff:masterfrom
a-hurst:matlab_consistent_seed_state

Conversation

@a-hurst

@a-hurst a-hurst commented Jun 16, 2021 •

Copy link
Copy Markdown
Collaborator

PR Description

Closes #74 (at least as far as MATLAB equivalence is concerned). This PR modifies NoisyChannels to always use a copy of the random state object during RANSAC when matlab_strict is True. This results in the random state being identical for each run of NoisyChannels.find_bad_by_ransac, matching MATLAB PREP.

Also I realize I forgot to update the whats_new.rst for the last PR, so I did that here as well!

Merge Checklist

  • the PR has been reviewed and all comments are resolved
  • all CI checks pass
  • (if applicable): the PR description includes the phrase closes #<issue-number> to automatically close an issue
  • (if applicable): bug fixes, new features, or API changes are documented in whats_new.rst

@codecov-commenter

codecov-commenter commented Jun 16, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #89 (b589742) into master (b0c62ad) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #89   +/-   ##
=======================================
  Coverage   98.51%   98.51%           
=======================================
  Files           7        7           
  Lines         673      675    +2     
=======================================
+ Hits          663      665    +2     
  Misses         10       10           
Impacted Files Coverage Δ
pyprep/utils.py 100.00% <ø> (ø)
pyprep/find_noisy_channels.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b0c62ad...b589742. Read the comment docs.

@sappelhoff sappelhoff left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks - also for adding that whatsnew entry!

@sappelhoff sappelhoff added this to the 0.4.0 milestone Jun 17, 2021

@sappelhoff sappelhoff left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Just for clarification before merging: Does this enable us to do some matprep-artifact testing that we weren't able to cleanly do before?

@a-hurst

a-hurst commented Jun 17, 2021 •

Copy link
Copy Markdown
Collaborator Author

Nope: since the channel interpolation method still differs, the re-referencing process still ends up diverging numerically from MatPREP. This just makes it possible to add MatPREP comparisons for the fixed channel interpolation when we get to it.

@sappelhoff
sappelhoff merged commit 6abe0bc into sappelhoff:master Jun 17, 2021
@sappelhoff

Copy link
Copy Markdown
Owner

okay :) then in it goes 🚀 thanks @a-hurst

@a-hurst a-hurst mentioned this pull request Jun 17, 2021
22 of 23 tasks
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.

RANSAC random seeds work differently in PyPREP than in MATLAB PREP

3 participants