Skip to content

Conversation

@alejoe91
Copy link
Member

The auto_label_units was used only for the model-based labeling, but there are other ways to label units! (see #4304 )

This PR renames auto_label_units to model_based_label_units. In addition, it adds a unitrefine_label_units that 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.

@alejoe91 alejoe91 requested a review from chrishalcrow January 22, 2026 15:21
@alejoe91 alejoe91 added the curation Related to curation module label Jan 22, 2026
classified_df.to_csv(f"{sorting_path}/cluster_prediction.tsv", sep="\t", index_label="cluster_id")


def auto_label_units(
Copy link
Member

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"
Copy link
Member

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

Copy link
Member

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.

alejoe91 and others added 2 commits January 22, 2026 18:38
Co-authored-by: Chris Halcrow <57948917+chrishalcrow@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

curation Related to curation module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants