This project applies machine learning to classify neuronal spike data. It uses spike templates, amplitude data, and channel positions from PHY's spike sorting framework, and transforms them into a training dataset for classification.
- Extracts features from
.npyfiles generated by spike-sorting tools (e.g., PHY/Kilosort) - Builds a CSV-based dataset for training
- Applies multiple ML models to classify neuronal spikes
- Evaluates classifier performance
- Produces a predicted output dataset
Install dependencies with:
pip install -r requirements.txtOpen the Jupyter notebook and follow the steps to:
- Load and preprocess
.npydata - Generate the training dataset
- Train ML models on spike features
- Evaluate model accuracy and compare results
The original .npy spike data files are too large to include here. To run this notebook:
- Download the data from your own recordings (or contact the repo author)
- Place the following files in a
data/directory:spike_templates.npyamplitudes.npychannel_positions.npy
Included: example_output.csv
A simulated output of the final classification dataset (predicted spike types).
We apply and evaluate several classifiers on the extracted spike data, including:
- Logistic Regression
- Support Vector Machines
- Decision Trees
We summarize their performance using accuracy, confusion matrices, and example output tables. (See notebook for visualizations.)
- Feature distribution plots
- Accuracy comparison bar chart (if enabled)
- Discussion of classifier trade-offs
- Add support for real-time classification during spike recording
- Explore deep learning methods (e.g., CNN, LSTM) on waveform segments
- Integrate ground truth validation using labeled datasets
numpypandasmatplotlibscikit-learn