-
Notifications
You must be signed in to change notification settings - Fork 93
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
[Bug] CAD output is not the same as original MATLAB Version #443
Comments
Hey, thanks for your detailed report. |
you've pointed to line: elephant/elephant/cell_assembly_detection.py Line 363 in 6ed3cb3
another change to alpha seems to occur here: elephant/elephant/cell_assembly_detection.py Line 255 in 6ed3cb3
I suggest creating a validation test based on the original MATLAB implementation as a regression test. |
Yes, that link is the original MATLAB code published by the article's main author. |
Hi,
That’s a good idea!
Regarding the original MATLAB code link, you have pointed the correct link.
Cheers,
Peyman
… On May 11, 2022, at 06:46, Moritz Kern ***@***.***> wrote:
you've pointed to line:
https://github.com/NeuralEnsemble/elephant/blob/6ed3cb3089783035885e2fbec1fff535df7369cd/elephant/cell_assembly_detection.py#L363
another change to alpha seems to occur here:
https://github.com/NeuralEnsemble/elephant/blob/6ed3cb3089783035885e2fbec1fff535df7369cd/elephant/cell_assembly_detection.py#L255
I suggest creating a validation test based on the original MATLAB implementation as a regression test.
Is this the MATLAB-implementation provided by the author you are using: https://github.com/DurstewitzLab/Cell-Assembly-Detection ?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
* keep input alpha as "alph" to be coherent with the MATLAB implementation of CAD * replace np.int with int, since np.int is deprecated * add comment on changes, reference to issue #443
Fixed with #576 |
Describe the bug
CAD cell assembly detection method output is not the same as the original MATLAB version provided by the article's author. I have checked the source codes, and found the parameter alpha in the " # testing for higher order assemblies" part gives the wrong value as it should take the original alpha=0.05 in the right side.
alpha = alpha / float(len(w2_to_test) * n_as * (2 * max_lag + 1))
As alpha in previous lines recalled and its value is changed because of same alpha values in both side of equation, it should be changed in a way that the value of alpha in the right side always is be the same is the alpha input parameter.
To Reproduce
As alpha parameter name in input parameter may be changed to alph (as well as the same MATLAB version) and alpha parameter in the right side of alpha = alph/ float(len(w2_to_test) * n_as * (2 * max_lag + 1)) changes to alph.
Environment
elephant
python package version: 0.10.0Environment
conda
,pip
, source):neo
python package version:elephant
python package version:The text was updated successfully, but these errors were encountered: