Skip to content

The project focuses on analyzing neural activity data to classify neuron types (spiny and aspiny). It integrates unsupervised learning methods (PCA, Autoencoders) and supervised learning models (Logistic Regression, MLP) to build accurate classifiers that effectively analyze neurons' electrical responses.

License

Notifications You must be signed in to change notification settings

12danielLL/Neural_Networks_Project

Repository files navigation

Neural Networks Project

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.

Table of Contents

  1. Project Structure
  2. Project Overview
  3. Key Results
  4. Visualizations
  5. How to Run
  6. File Structure
  7. Technologies
  8. License

Project Overview

Goals

  1. Analyze and visualize neural activity data.
  2. Train classifiers to distinguish between neuron types: spiny and aspiny.
  3. Explore unsupervised learning methods like PCA and Autoencoders for data dimensionality reduction.
  4. Implement and evaluate supervised learning models, including Logistic Regression, Perceptron, and MLP.

Tasks

The project is divided into three main parts:

Part A: Data Analysis and Visualization

  1. Description of spiny and aspiny neuron types.
  2. Visualization of electrical stimuli over time.
  3. Analysis of neuron responses to stimuli.
  4. Calculation of spike trains and time-dependent firing rates.

Part B: Unsupervised Learning

  1. Principal Component Analysis (PCA) for dimensionality reduction.
  2. Implementation of an Autoencoder to compress and reconstruct the data.

Part C: Supervised Learning

  1. Training and evaluation of Logistic Regression and Perceptron models.
  2. Training a Multi-Layer Perceptron (MLP) with Gradient Descent (GD) and Stochastic Gradient Descent (SGD).

Key Results

  • 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.

Visualizations

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.

How to Run

Prerequisites

  • Python 3.8 or higher
  • Jupyter Notebook
  • pip (Python package manager)
  1. Clone this repository to your local machine:
git clone https://github.com/12danielLL/Neural-Networks-Project.git
  1. Navigate to the project directory:
cd Neural-Networks-Project
  1. Install the required dependencies:
pip install -r requirements.txt
  1. Open the Jupyter Notebook:
jupyter notebook Neural_Networks_Project.ipynb
  1. Execute the cells in sequence to reproduce the analysis, visualizations, and results.

Troubleshooting

  • 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.

File Structure

├── 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

Technologies

  • Python
  • TensorFlow/PyTorch
  • Jupyter Notebook
  • NumPy
  • Pandas
  • Matplotlib

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

The project focuses on analyzing neural activity data to classify neuron types (spiny and aspiny). It integrates unsupervised learning methods (PCA, Autoencoders) and supervised learning models (Logistic Regression, MLP) to build accurate classifiers that effectively analyze neurons' electrical responses.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published