This post explains how to get started with fNIRS sensing data specifically oxygenated hemoglobin “HbO2/HbO” data for analyzing a data stream from a sensor, in this case Blueberry.
The goal here is to help with understanding how to take the sensor data signal and get to a point where clear increases and decreases in thinking intensity are shown during a period of use. In this tutorial we will use a sample dataset to start with.
In this post we explore two core concepts with fNIRS data:
- Experiments to determine a clean ‘brain activity’ signal
- Comparing ‘brain activity’ with a secondary source of data, typing speed
The image below shows the ideal change in HbO2 blood oxygenation for an intensity of thought increase.
If you want to learn more about fNIRS you can read about it here.
Thanks to python and scikit learn this can be done quite fast! This tutorial walks you through an open source Jupyter notebook and a few methods to get started. Find the Github public repo here.
Steps 1–6 Filtration and initial brain activity signal estimation
Step 1 Install the required libraries for scikit learn and pandas (tools for managing the data + performing some of the initial analysis) — this notebook was built using Python 3 Kernel
Step 2 Explore initial types of analysis to run on fNIRS data, most statistical analysis will try out 4 in this tutorial:
- Standard Deviation
- Rolling Average
- Volatility and Change in Rolling Average
In each case a window of time is selected to get a snapshot of what the data looks like.
Hemodynamic responses in fNIRS data typically occur over a 5 to 25 second window of time.
Step 3: Using a rolling average of the HbO change it becomes possible to see a pattern or rhythm of rise and fall of HbO during a task period
In the sample data provided over 2 minutes or 120 seconds it is possible to see the overall rise and fall 2 times. Rhythmic Mayer Waves are present in blood flow data though.