This repository contains the final project for the Neural Networks course . The project involves analyzing neural activity data to classify neuron types based on their electrical responses. The dataset was provided by the Allen Institute for Brain Science, with neurons sampled from human and mouse cortices.
- Project Structure
- Project Overview
- Key Results
- Visualizations
- How to Run
- File Structure
- Technologies
- License
- Analyze and visualize neural activity data.
- Train classifiers to distinguish between neuron types:
spiny
andaspiny
. - Explore unsupervised learning methods like PCA and Autoencoders for data dimensionality reduction.
- Implement and evaluate supervised learning models, including Logistic Regression, Perceptron, and MLP.
The project is divided into three main parts:
- Description of
spiny
andaspiny
neuron types. - Visualization of electrical stimuli over time.
- Analysis of neuron responses to stimuli.
- Calculation of spike trains and time-dependent firing rates.
- Principal Component Analysis (PCA) for dimensionality reduction.
- Implementation of an Autoencoder to compress and reconstruct the data.
- Training and evaluation of Logistic Regression and Perceptron models.
- Training a Multi-Layer Perceptron (MLP) with Gradient Descent (GD) and Stochastic Gradient Descent (SGD).
- PCA: Identified 27 principal components needed to retain 99% of the data's variance.
- Autoencoder: Achieved a mean squared error (MSE) of 4% after 50 epochs, but PCA provided better separation of neuron types.
- Logistic Regression and Perceptron:
- Logistic Regression outperformed Perceptron with a higher recall (0.99 vs. 0.94).
- MLP:
- GD and SGD models achieved similar performance (precision and recall = 0.99).
- No significant overfitting observed.
The Results.pdf
document contains graphs and charts for:
- Firing rates of neurons.
- PCA projections in 2D and 3D.
- Confusion matrices and ROC curves for classifiers.
- Python 3.8 or higher
- Jupyter Notebook
- pip (Python package manager)
- Clone this repository to your local machine:
git clone https://github.com/12danielLL/Neural-Networks-Project.git
- Navigate to the project directory:
cd Neural-Networks-Project
- Install the required dependencies:
pip install -r requirements.txt
- Open the Jupyter Notebook:
jupyter notebook Neural_Networks_Project.ipynb
- Execute the cells in sequence to reproduce the analysis, visualizations, and results.
- If you encounter missing libraries, install them individually using:
pip install <name of library>
- For any other issues or questions, please open an issue on GitHub.
├── LICENSE # License file for the project
├── Neural Networks Project - Instructions.pdf # Detailed project instructions
├── Neural Networks Project - Results.pdf # Report with project results and visualizations
├── Neural_Networks_Project.ipynb # Jupyter Notebook with code implementation
├── README.md # Documentation for the project
- Python
- TensorFlow/PyTorch
- Jupyter Notebook
- NumPy
- Pandas
- Matplotlib
This project is licensed under the MIT License. See the LICENSE file for more details.