Automatic curation with metrics
Solves #2479
Scikit-learn is not a dependency either - how do we want to handle this? It would be needed for both the prediction and training steps, if we implement that too
You should move the imports into the functions that use it ;)
@chrishalcrow just noticed this in the curation model based tutorial:
Possibly an ordering issue? maybe using set would be better there
TODO:
@chrishalcrow @anoushkajain
API
-
[x] (Chris) Add consistency check for metric params:
- training: with multiple analyzer, if params a metric from different analyzers are not the same, warn and skip metric from params
- predicting: add
enforce_metric_params=Falseinauto_label_units. If params are different for a metric, warn the user but do not raise. In caseenforce_metric_params==True, throw an error
-
[x] (Chris)
auto_label_unitsshould return apandas.Dataframe
Models
- [ ] (Anoushka) Update model on HF:
- [ ]
cascaded_classifier.skops->noise_sua_mua_model.skops - [ ]
meta_data.json->metadata.json - [ ] add
model_info.json
- [ ]
Docs
- [x] (Chris) Favore
trust_model=Trueinstead oftrusted=...in tutorials and how to - [x] (Chris) Update
A more realistic example: Neuropixels datawith the ``noise_sua_mua_model.skopsand run on the existingsorting_analyzer` - [x] (Chris) model_info.json: all entries should be lists
Hi, I was wondering if the classification here is different compared to the one implemented at the Allen Institute. I see that @alejoe91 is involved in both. I am interested especially regarding Neuropixel data (both 1 & 2). Thanks!
Hi, I was wondering if the classification here is different compared to the one implemented at the Allen Institute. I see that @alejoe91 is involved in both. I am interested especially regarding Neuropixel data (both 1 & 2). Thanks!
Hi @RobertoDF
They are essentially the same models, but this PR adds some backbone machinery and should minimize the amount of custom steps to apply the models :) Once this is merged and release, I plan to update the Allen institute classifier to use this SpikeInterface wrapper.
We apply the same model to both NP1 and NP2 data and it gives quite good results on both, especially in identifying noisy units.
Thanks!
@chrishalcrow @anoushkajain let's have a final push on this.
Just reviewing the generated docs, there are some failures:
-
At the end of Model Based Curation
si.auto_label_unitsshould besc.auto_label_units- Some rendering/formatting issue at the end:
Question for @anoushkajain and @chrishalcrow
@chrishalcrow fixed a couple of broken refs in the docs due to the mertics -> metrics correction in the file name.
Merging this! thank you all for working on this!
It's a great contribution for the community :)