-
Notifications
You must be signed in to change notification settings - Fork 38
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
Feat: Add all_burst_number #367
Conversation
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.
Thanks @arnaudon looks very good. I added a few remarks.
Could you also add a test to it?
In the test could you check when number of isis is <= 1?
Also, will it work when the number of isis is equal to 2?
efel/pyfeatures/pyfeatures.py
Outdated
@@ -140,6 +141,45 @@ def strict_burst_number() -> np.ndarray: | |||
return np.array([burst_mean_freq.size]) | |||
|
|||
|
|||
def all_burst_number(): |
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.
Wouldn't it be more descriptive to call it something like count_burst_events_by_isi_clustering
?
efel/pyfeatures/pyfeatures.py
Outdated
peak_times = peak_times[(peak_times > stim_start) & (peak_times < stim_end)] | ||
isis = np.diff(peak_times) | ||
|
||
from sklearn.cluster import KMeans |
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.
Could you put it at the top of the file and then add scikit-learn>=X.Y.Z
to setup.py
, where X.Y.Z is the version you tested?
efel/pyfeatures/pyfeatures.py
Outdated
@@ -140,6 +141,46 @@ def strict_burst_number() -> np.ndarray: | |||
return np.array([burst_mean_freq.size]) | |||
|
|||
|
|||
def all_burst_number(raise_warnings: bool = False) -> np.ndarray: |
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.
Wouldn't it be more descriptive to name it something like count_burst_events_by_isi_clustering
?
I'm closing this, we can use #391 |
Description
See docstring for details, WIP for work with @PolinaL
I'll add test/doc/changelog once stable
Checklist: