Skip to content
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

Closed
wants to merge 13 commits into from
Closed

Feat: Add all_burst_number #367

wants to merge 13 commits into from

Conversation

arnaudon
Copy link
Contributor

@arnaudon arnaudon commented Feb 6, 2024

Description

See docstring for details, WIP for work with @PolinaL

I'll add test/doc/changelog once stable

Checklist:

  • Unit tests are added to cover the changes (skip if not applicable).
  • The changes are mentioned in the documentation (skip if not applicable).
  • CHANGELOG file is updated (skip if not applicable).

@arnaudon arnaudon requested a review from anilbey February 6, 2024 08:57
Copy link
Contributor

@anilbey anilbey left a 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?

@@ -140,6 +141,45 @@ def strict_burst_number() -> np.ndarray:
return np.array([burst_mean_freq.size])


def all_burst_number():
Copy link
Contributor

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?

peak_times = peak_times[(peak_times > stim_start) & (peak_times < stim_end)]
isis = np.diff(peak_times)

from sklearn.cluster import KMeans
Copy link
Contributor

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?

@@ -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:
Copy link
Contributor

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?

@arnaudon
Copy link
Contributor Author

I'm closing this, we can use #391

@arnaudon arnaudon closed this May 13, 2024
@arnaudon arnaudon deleted the all_burst_number branch May 13, 2024 08:07
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.

2 participants