-
Notifications
You must be signed in to change notification settings - Fork 241
Refactor API for auto_label_units
#4338
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
base: main
Are you sure you want to change the base?
Conversation
| classified_df.to_csv(f"{sorting_path}/cluster_prediction.tsv", sep="\t", index_label="cluster_id") | ||
|
|
||
|
|
||
| def auto_label_units( |
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.
Can we deprecate auto_label_units (slowly!)? I think a lot of people have copies of unitRefine notebooks using it!
| ---------- | ||
| sorting_analyzer : SortingAnalyzer | ||
| The sorting analyzer object containing the spike sorting results. | ||
| noise_neural_classifier : str or Path or None, default: "SpikeInterface/UnitRefine_noise_neural_classifier_lightweight" |
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.
I'm scared of making these default. The models are trained with NP data, on data in physical units, using metrics computed using si < 0.104 etc.
I think people should investigate and decide what to use. The model on the si page is also already out of date with the model used in the paper, which is on Anoushka's hfh: https://huggingface.co/AnoushkaJain3/noise_neural_classifier_lightweight
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.
I'm worried about people blindly using this without understanding the assumptions that went into it.
Co-authored-by: Chris Halcrow <57948917+chrishalcrow@users.noreply.github.com>
The
auto_label_unitswas used only for the model-based labeling, but there are other ways to label units! (see #4304 )This PR renames
auto_label_unitstomodel_based_label_units. In addition, it adds aunitrefine_label_unitsthat automate the noise/neural + MUA/SUA classification. By default, lightweight models are used since they give almost the same performance as the full models, but don't depend on PCA metrics.