This repository contains code and links to dataset from Geiller T., Vancura B., et al. Neuron (2020).
The main script of the code is CNN_Classification.
- Python 3.5
- numpy >= 1.18.1
- scipy >= 1.4.1
- scikit-image >= 0.11.0
- scikit-learn >= 0.22.1
- tensorflow == 2.1.0
- keras == 2.3.1
- seaborn >= 0.10.1
- matplotlib >= 3.1.3
- sympy >= 1.5.1
It returns the training and testing confusion matrices as well as the training and testing accuracy performance for each cell separately.
The code is formulated to classify the following subtypes:
3-class problem (AAC-BC, BISTR-SOM, CCK)
4-class problem (AAC-BC, BISTR-SOM, CCK, NPY)
5-class problem (AAC, BC, BISTR, CCK, SOM), and
6-class problem (AAC, BC, BISTR, SOM, CCK, NPY)
The following parameters are defined by the user:
-
num_iters --- Number of iterations for the random train-test splits
-
epochs --- Number of epochs required for the CNN model to be trained
-
loss_func --- Loss function for the optimizer
-
learning_rate --- Learning rate parameter for the optimizer
-
features --- Number of features to feed the CNN model. The options for this parameter are the following:
- 1: 1D-CNN is fed with calcium signal laps
- 2: 2D-CNN is fed with calcium-velocity signal laps
- 3: 2D-CNN is fed with calcium-velocity-zdepth signal laps
-
indexing --- With this parameter the user defines the cell-types (either merged categories or separate cells) that will be used in the classification procedure
-
balance --- This parameter defines the number of the training examples for the merged categories. The options for this parameter are the following:
- balanced: Same number of training examples for each category
- stratified: It preserves the proportion of target as in original dataset, in the train datasets.
-
category --- The options for this parameter are the following
- min_categ: As a number of training examples for each category we use the number of examples from the category with the minimum number of examples.
- imbalanced: For each category we use all its available examples for training
- semi_balanced: All categories start with the minimum number of training examples (min_categ) and the user adds extra examples via the parameter size_increased, so that for each category almost the same number of training examples are used.
-
size_increased --- If category parameter is defined as semi_balanced, in size_increased the user defines how many examples should be added to each category.
-
test_size --- User defines the number of testing examples to be used from each category
-
step_laps --- Number of laps to be merged
-
interp_timesteps --- Length of the interpolated signal laps
eirinitroul [AT] gmail [DOT] com; chavlis [DOT] spiros [AT] gmail [DOT] com
The dataset will be made available soon.