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 a follow up PR to #576 , adding a validation test.
Bug
This was discovered in issue #443 .
Summary: CAD (cell assembly detection) output is not the same as the original MATLAB version provided by the article's author.
The MATLAB implementation by Eleonora Russo can be found here:
https://github.com/DurstewitzLab/Cell-Assembly-Detection .
This implementation was used in:
Eleonora Russo and Daniel Durstewitz. Cell assemblies at multiple time scales with arbitrary lag constellations. Elife, 6:e19428, 2017.
MATLAB
The MATLAB implementation defines
alph
as the input parameter of the function:Line 1 in FindAssemblies_recursive.m
In later steps, the original input
alph
is kept and derived values are stored as a separate variablealpha
.Line 30 in FindAssemblies_recursive.m
Line 106 in FindAssemblies_recursive.m
Elephant
The Elephant implementation defines
alpha
as the input parameter of the function:elephant/elephant/cell_assembly_detection.py
Lines 90 to 95 in b9d0d54
In subsequent steps, the original input
alpha
is changed:elephant/elephant/cell_assembly_detection.py
Line 255 in b9d0d54
elephant/elephant/cell_assembly_detection.py
Line 363 in b9d0d54
As the value of
alpha
changes, the results differ from the MATLAB implementation, where the original input is stored asalph
and is not changed inside the function.Fix
Introduced a new variable
alph
, to store the input value ofalpha
.todo