Pharmahacks 2024

Marcus Lee,ProgrammingHackathonNeuroscience

I recently participated at the Pharmahacks 2024 (opens in a new tab) hackathon. I was part of a team of 5 that tackled the neural decoding challenge. You can read about it in our github repository (opens in a new tab)'s readme. I wanted to use this post to document my experience and the code I wrote.

Problem Approach

Analysis

Our first mission was to understand the data. after thorough research & analysis of the neural paper & use tutorial of the data, we narrowed down our focus to these specific factors:

Data processing

The data of a single session is stored in an NWB file (opens in a new tab) which is composed of a whole bunch of information, among which is 4 deconvoluted planes, each of which are asynchronized from one another, meaning there are many NaN (missing) values at certain timestamps. Below was our process to resolve these issues;

Machine Learning Model

Once it came down to choosing a model, we had to research different categories of models. Through our prior analysis, we knew we wanted to use something of the classification/regression sort which led us to using a RandomForestRegressor.

Results

Our final models had the following MSE:

Here are some plots showing off the actual mouse positions vs predicted by our models:

Predicted lateral positions Predicted forward positions

All of these results are from a single 400 trial session.

Experience

Overall this was a very exciting experience. I learned a lot about neural data and how to process it. I also learned some basic understanding of Neuroscience from my team. Additionally, I also made strides in my understanding of data science, data cleaning and machine learning. It was super fun and I would reccomend it to anyone who is interested in neuroscience or data science.


Pharmahacks Github Repository (opens in a new tab)

Made By Marcus Lee.