--- tags: - neuroscience - spike-sorting - electrophysiology - mouse - neuropixels - scikit-learn - spikeinterface - modAL license: mit language: - en metrics: - accuracy pipeline_tag: tabular-classification --- # 🧠 UnitRefine – Active Learning Classifier (Mice) This repository supports an **active learning pipeline** for refining spike sorting classification using human-in-the-loop curation. It includes both training data and a model trained on **mouse electrophysiological recordings**, annotated with labels such as `sua` and `not-sua`. --- ## 📁 Files and Descriptions | File | Description | |-------------------|-----------------------------------------------------------------------------| | `X_labeled.csv` | Full feature matrix used for training the classifier | | `y_labeled.csv` | Corresponding labels for `X_labeled.csv` (`sua as 1`, `not-sua as 0`) | | `X_new.csv` | Features of newly queried units labeled by a human using SortingView | | `y_new.csv` | Human-verified labels for the units in `X_new.csv` | | `learner.skops` | Trained `RandomForestClassifier` serialized using [`skops`](https://skops.readthedocs.io/) | --- ## 🔁 Active Learning Workflow 1. Query uncertain units using [modAL](https://modal-python.readthedocs.io/). 2. Present units to human curators via SortingView. 3. Incorporate corrected labels into the training set. 4. Update and re-train the model. 5. Push updates to the Hugging Face Hub. --- ## 🐭 Dataset Info - **Species**: Mouse - **Features**: Quality metrics + Template metrics from Spikeinterface - **Label classes**: `not-sua`, `sua`, `psua` --- ## 🚀 Model Use To use the trained classifier: ```python from skops.io import load clf = load("learner.skops") preds = clf.predict(X_test[feature_columns])