BRAIN DRAIN: USING BRAINWAVES AND MACHINE LEARNING TO DETECT ERRORS IN HUMAN PROBLEM SOLVING KATIE PORTERFIELD. Advisor JOSHUA ECKROTH

Similar documents
TECHNICAL SPECIFICATIONS, VALIDATION, AND RESEARCH USE CONTENTS:

Electroencephalography Analysis Using Neural Network and Support Vector Machine during Sleep

Sense Making in an IOT World: Sensor Data Analysis with Deep Learning

Recurrent Neural Networks

FUNCTIONAL EEG ANALYZE IN AUTISM. Dr. Plamen Dimitrov

Brain Computer Interfaces (BCI) Communication Training of brain activity

3 An Illustrative Example

Auto-Tuning Using Fourier Coefficients

Artificial Neural Networks and Support Vector Machines. CS 486/686: Introduction to Artificial Intelligence

A simple application of Artificial Neural Network to cloud classification

Data Analysis Methods: Net Station 4.1 By Peter Molfese

ANIMA: Non-Conventional Interfaces in Robot Control Through Electroencephalography and Electrooculography: Motor Module

Time Domain and Frequency Domain Techniques For Multi Shaker Time Waveform Replication

UNSUPERVISED MACHINE LEARNING TECHNIQUES IN GENOMICS

Applying Deep Learning to Car Data Logging (CDL) and Driver Assessor (DA) October 22-Oct-15

Big Data Analytics CSCI 4030

Supporting Online Material for

5MD00. Assignment Introduction. Luc Waeijen

Brain Maps The Sensory Homunculus

The Scientific Data Mining Process

Waves: Recording Sound Waves and Sound Wave Interference (Teacher s Guide)

A Web-Based System for EEG Data Visualization and Analysis

Course Title: Advanced Topics in Quantitative Methods: Educational Data Science Practicum

Survey of the Mathematics of Big Data

Environmental Remote Sensing GEOG 2021

Binary Search Trees CMPSC 122

Music Genre Classification

SR2000 FREQUENCY MONITOR

The Impact of Big Data on Classic Machine Learning Algorithms. Thomas Jensen, Senior Business Expedia

Overview. Swarms in nature. Fish, birds, ants, termites, Introduction to swarm intelligence principles Particle Swarm Optimization (PSO)

Anomaly Detection and Predictive Maintenance

Convolution, Correlation, & Fourier Transforms. James R. Graham 10/25/2005

A Demonstration of a Robust Context Classification System (CCS) and its Context ToolChain (CTC)

Novelty Detection in image recognition using IRF Neural Networks properties

HITACHI INVERTER SJ/L100/300 SERIES PID CONTROL USERS GUIDE

P300 Spelling Device with g.usbamp and Simulink V Copyright 2012 g.tec medical engineering GmbH

Introduction to Machine Learning and Data Mining. Prof. Dr. Igor Trajkovski

TOWARDS SIMPLE, EASY TO UNDERSTAND, AN INTERACTIVE DECISION TREE ALGORITHM

A Study of Brainwave Entrainment Based on EEG Brain Dynamics

How to use Big Data in Industry 4.0 implementations. LAURI ILISON, PhD Head of Big Data and Machine Learning

Forecasting Trade Direction and Size of Future Contracts Using Deep Belief Network

RESEARCH ON SPOKEN LANGUAGE PROCESSING Progress Report No. 29 (2008) Indiana University

SELECTING NEURAL NETWORK ARCHITECTURE FOR INVESTMENT PROFITABILITY PREDICTIONS

ANALYTICS IN BIG DATA ERA

Neural Networks and Support Vector Machines

Machine Learning for Medical Image Analysis. A. Criminisi & the InnerEye MSRC

Requirements Analysis Concepts & Principles. Instructor: Dr. Jerry Gao

Programming Exercise 3: Multi-class Classification and Neural Networks

PYKC Jan Lecture 1 Slide 1

Computer Networks and Internets, 5e Chapter 6 Information Sources and Signals. Introduction

Why is Internal Audit so Hard?

Recognizing Informed Option Trading

Artificial Neural Network for Speech Recognition

Software that writes Software Stochastic, Evolutionary, MultiRun Strategy Auto-Generation. TRADING SYSTEM LAB Product Description Version 1.

Anomaly Detection in Predictive Maintenance

Predicting Flight Delays

Class #6: Non-linear classification. ML4Bio 2012 February 17 th, 2012 Quaid Morris

Doppler. Doppler. Doppler shift. Doppler Frequency. Doppler shift. Doppler shift. Chapter 19

MANAGING QUEUE STABILITY USING ART2 IN ACTIVE QUEUE MANAGEMENT FOR CONGESTION CONTROL

1. Classification problems

Little LFO. Little LFO. User Manual. by Little IO Co.

A Comparative Study of Database Design Tools

A Simple Feature Extraction Technique of a Pattern By Hopfield Network

PIXEL-LEVEL IMAGE FUSION USING BROVEY TRANSFORME AND WAVELET TRANSFORM

Chapter 6. The stacking ensemble approach

Super Brain Yoga ~ A Research Study ~ By Dr. Ramesh, MDS

Alternative Biometric as Method of Information Security of Healthcare Systems

What is Data Science? Data, Databases, and the Extraction of Knowledge Renée November 2014

Chapter 4: Artificial Neural Networks

B3. Short Time Fourier Transform (STFT)

BIOINF 585 Fall 2015 Machine Learning for Systems Biology & Clinical Informatics

Car Insurance. Havránek, Pokorný, Tomášek

Using Python for Signal Processing and Visualization

Predicting borrowers chance of defaulting on credit loans

Advanced analytics at your hands

Recognition. Sanja Fidler CSC420: Intro to Image Understanding 1 / 28

Self Organizing Maps: Fundamentals

Reflection and Refraction

ARTIFICIAL INTELLIGENCE (CSCU9YE) LECTURE 6: MACHINE LEARNING 2: UNSUPERVISED LEARNING (CLUSTERING)

Implementation of a 3-Dimensional Game for developing balanced Brainwave

Automatic 3D Reconstruction via Object Detection and 3D Transformable Model Matching CS 269 Class Project Report

Semester Thesis Traffic Monitoring in Sensor Networks

Performing the Fast Fourier Transform with Microchip s dspic30f Series Digital Signal Controllers

STATISTICA. Financial Institutions. Case Study: Credit Scoring. and

Matlab GUI for WFB spectral analysis

Bijan Raahemi, Ph.D., P.Eng, SMIEEE Associate Professor Telfer School of Management and School of Electrical Engineering and Computer Science

Structural Health Monitoring Tools (SHMTools)

Traffic Prediction in Wireless Mesh Networks Using Process Mining Algorithms

Using an Oscilloscope

Machine learning for algo trading

Short-time FFT, Multi-taper analysis & Filtering in SPM12

Comparison of Supervised and Unsupervised Learning Classifiers for Travel Recommendations

Data Mining Practical Machine Learning Tools and Techniques

Wavelet analysis. Wavelet requirements. Example signals. Stationary signal 2 Hz + 10 Hz + 20Hz. Zero mean, oscillatory (wave) Fast decay (let)

An Introduction to Neural Networks

Structural Health Monitoring Tools (SHMTools)

1 One Dimensional Horizontal Motion Position vs. time Velocity vs. time

Decision Trees from large Databases: SLIQ

EARTH PEOPLE TECHNOLOGY SERIAL GRAPH TOOL FOR THE ARDUINO UNO USER MANUAL

Transcription:

BRAIN DRAIN: USING BRAINWAVES AND MACHINE LEARNING TO DETECT ERRORS IN HUMAN PROBLEM SOLVING by KATIE PORTERFIELD Advisor JOSHUA ECKROTH A senior research proposal submitted in partial fulfillment of the requirements for the degree of Bachelor of Science in the Department of Mathematics and Computer Science in the College of Arts and Science at Stetson University DeLand, Florida Spring Term 2016

TABLE OF CONTENTS ABSTRACT.....2 INTRODUCTION 3 BACKGROUND. 4 PREVIOUS WORK.... 6 PROOF OF CONCEPT....7 METHODOLOGY.. 9 RESULTS.......11 DISCUSSION.... 12 CONCLUSION AND NEXT STEPS.........12 REFERENCES........13

ABSTRACT The Muse Headband is a simple to use EEG machine that provides real time measurements of brain waves. Using this headband, we built a model using big data and machine learning techniques to interpret brain wave patterns to create a real time feedback system that helps the user understand their cognitive thinking while solving a problem. Once further developed, this model could then be applied in an educational setting to help a student understand how they are progressing through a problem without the interactions of a teacher to support them.

1. INTRODUCTION Every student needs different levels of attention when learning and solving a problem. Little interaction between the teacher and student can cause a decrease in the information retention. Affective learning is an important aspect of education. Emotions of students need to be recognized and interpreted so as to motivate students and deepen learning. [1] However, when a student is by himself or herself, the student may experience difficulties when trying to work or take tests. If the student could understand how he or she is thinking, the student could better understand the presented problem. There currently does not exist an application to help a user work through their problems based on the student s brain waves. By monitoring brain waves, an application could provide insight of how the student is thinking and if he or she is on the right track to solving the problem. 2. BACKGROUND There are five types of brain waves: alpha, beta, theta, delta, and gamma. Each wave represents a different kind thinking, whether cognitive or not. Delta waves are a regular, low amplitude wave of 1 5 Hz, and associated with low neuronal firing rate and deep sleep. Theta waves are a medium amplitude, and medium frequency of 5 8Hz that corresponds with drowsiness. Beta waves have an irregular pattern between 12 30 Hz during alertness and active thinking. Alpha waves are a regular pattern with a frequency of 8 12 Hz. Alpha waves tend to have a high amplitude when awake, but not stressed. [2] Alpha waves can be divided into two main categories, upper and lower. Lower alpha waves tend to reflect attentional demands including alertness and vigilance. Semantic memory

processes and higher specific task demands are associated with higher alpha frequencies. [2] What is know as alpha synchronization occurs when the alpha activity increases. When the alpha waves decrease, the waves are desynchronized. Alpha synchronization indicates creative cognition because of the high internal processing demands that creativity requires in comparison to semantic memory. [3] Alpha waves have event related rhythms that help demonstrate different brain processes called oscillations. The oscillations are related to memory processes and movements through different types of events. By understanding the oscillations, alpha waves provide insight to detecting problem solving processes. The Muse Headband was released Winter of 2012 and has currently been used to focus monitor the user s daily brain activity. The Muse is marketed as a meditation application but has also been used to visualize a user s workout progress and overall daily life. Muse is an electroencephalogram (EEG) machine built with three reference sensors in the front, two forehead sensors, two ear sensors, and accelerometer. The headband can sample at a rate of 220 Hz or 500 Hz. Muse provides data regarding alpha, beta, theta, and delta waves amplitudes, along with eye blinks, and raw Fast Fourier Transform (FFT) of the various waves. The Muse s FFT data represent which frequencies are present and how much is present for every channel. When recording the data from the Muse Headset, the data reflected is a limited snapshot data of continuous data. Using a Hamming window allows for a better frequency measurement by reducing the amount of noise taken from the limited snapshot. A Hamming window works by a window views part of the information, then slides the window down to gather the next information, but contains overlap of the previous window. To calculate

the FFT, the Muse developers use a Hamming window of 256 samples, then slide over by 22 samples, or 1/10th of a second, to give an overlap window of 90%. Various brain waves and FFT data can allow for a better predictive model as discussed in the next section. 3. PREVIOUS WORKS Previous research suggests Wavelet Transform allows for better analysis of alpha oscillations by including time to keep the shape of the provided data. By having time frequency data, an EEG machine will be more accurately illustrate the event related frequencies. [5] Quiroga and Schurmann used this method to determine functions and sources of the alpha oscillations. [6] Fourier Transform is often used to illustrate two frequencies relationship; however, brain waves are non stationary signals causing the Fourier Transform to lose the time evolution of the frequency patterns. The Wavelet Transform can provide the same results as the Fourier Transform but keep the frequency patterns as the time continues. The Wavelet Transform has also been previously used for pattern recognition. In their results, Quiroga and Schurmann argue the usefulness of the Wavelet Transform due to it s ability to use a varying window to achieve a better time frequency resolution. Wavelet Transform was also used to help find patterns in EEG data to predict seizures in patients. They placed the raw EEG time series and the Wavelet Transform into a Recurrent Neural Network to train each EEG channel separately. [7] They also used bivariate features, quantitative relationship between two signals, that were computed on 5 second windows of every pair of EEG channels. Each window was associated then with a binary feature of seizure or no

seizure. After testing out different classifiers, the studied showed the best one was a Convolutional Neural Network with the Wavelet Transform. 4. PROOF OF CONCEPT Our first attempt was focused on determining if there was a difference in correct versus incorrect thinking by developing a prime number Java Application. The application provides basic instructions to click yes or no depending on if they think the number presented is prime. The number shown is a randomly generated number. Time starts when the user clicks next after the instructions are presented. As each number is shown, the timestamp based on the system time, is recorded. Once the question has been answered, the application saves the number presented, whether the user got the answer wrong, and the time answered. This application does not have a time limit associated with each answer to prevent the user from being stressed and causing false results. To associate the data with Muse Headband, the recording is started first in the MuseLab by using the timestamp based also on the system time to be able to line up the data based on the two timestamps.

The graph illustrates the relationship between brain waves and correctness. The graph is split in half horizontally to demonstrate correct, 1, and incorrect, 0. Vertically, each brain wave has its own section to show how they are effected individually. The graph is aligned to the right to have the end time all the same due to the variability of each question time response. The graph illustrates the significant noise difference between correct and incorrect thinking. This difference lead us to believe there is something to learn about the brain wave patterns.

5. METHODOLOGY The model was created by two different parts, the user interface and the neural network. User Interface The user interface was a Java Application developed to display to the test subject five three digit multiplications and five three digit division equations. The user was selects yes or no to state if he or she believes the presented equation is true. He or she had unlimited time to answer each question and pen and paper. The average time for the test subject to answer all ten problems was around twenty minutes. The time each questions started, each question ended, whether the question was multiplication or division, the numbers presented and if the user got the answer right were all saved in the data set. The Java Application was sync to Muse Lab, as it recorded the brain waves, based on the provided time stamps. Fast Fourier Transform was already calculated by the Muse Headset and save in the Muse data file. Neural Network After gathering the data from the user interface, the files were merged using R and python then sent into a recurrent neural network. The neural network was build in python using Theano, a Python Library used to evaluate mathematical expressions that involve 1 multi dimensional arrays. Graham Taylor s Vanilla RNN was used to create the model because of the simple recurrent neural network script developed to output binary answers. 1 Taylor, Graham. "Vanilla RNN." https://github.com/gwtaylor/theano rnn/blob/master/rnn.py.

The neural network was built with 516 input nodes. Each node represented an FFT value gathered from the Muse Headband. The hidden node count was changed to determine the best outcome, which is discussed further in results. Prior work using brain waves and machine learning suggested using a recurrent neural network would be the most effective way. However, we ran the data through other classifiers as well. The data was sent into each classifier the same with each row containing all the fft values gathered at a specific time creating 516 data points per row. Each classifier was trained on the same ⅔ of data. The other clasifiers used were Decision Tree, SMO, nearest neighbor, and random forest. Decision trees create a tree like model to create a bunch of branches that represent the possible choices and their outcomes, till it reaches an end node with the final outcome. K nearest neighbor classifiers the k to the closest training set. Sequential minimal optimization optimizes support vector machines, which takes the data and places it into a higher dimension to determine the best vector to fit between the data. Random forest takes the data and divides it up into smaller subtrees. Each subtree then add weights to each branch, and the main model add weights to each subtree to determine their best options.

After the model was developed, a basic feedback system was created. While the user is wearing the headband, the muse headband reads the last twenty five received FFT values through a python script which loads the model and runs predict from Taylor s script. The script then receives an array output which is averaged. If the number calculated is one, the user is thinking correctly, if the number is zero the user is thinking incorrectly. 6. RESULTS After the first model was developed, tests were ran to determine the best way to create the neural network. The best hidden nodes amount was ten, with there being a 65% chance that the prediction is correct. The data was also thrown into weka and classified on other algorithms, seen in the following graph.

The recurrent neural network seemed to work the best coming out on top with the 65% in comparison to random forest at 64% and SMO at 63%. One nearest neighbor did the worst out of the tested classifiers. 7. DISCUSSION This experiment demonstrated their is a possible to predict and understand a person's brain wave pattern through classifiers. The data was trained across twelve people s answers and brain waves. Overall, the recurrent neural network proved to be better than chance; however, it is further research needs to be done to determine if the 65% accuracy is significant enough to be placed into real world scenarios along with developing the model more. 8. CONCLUSION AND NEXT STEPS This research focused on predicting brain wave data to determine if a user was thinking correctly about a problem. Using classifiers, with specific interest in recurrent neural networks, a model was developed which predicts accurately 65% of how a user is thinking. The next steps will include improving the accuracy of the predictive model, by testing other recurrent neural networks. Another way is to increase the size and diversity of the training set such as asking test subjects of different ages. Crossfold validation will also be added to create higher accuracy and better training. Lastly, we plan to transform the raw EEG data using wavelet transforms over fast fourier transform. Once a better predictive model is developed, a comparison between asking literary and mathematical based questions should be researched further.

9. REFERENCES [1] Li, Xiaowei, Bin Hu, Tingshao Zhu, Jingzhi Yan, and Fang Zheng. "Towards Affective Learning with an EEG Feedback Approach." 33. 2009. [2] Dietrich, Arne, and Riam Kanso. "A Review of EEG, ERP, and Neuroimaging Studies of Creativity and Insight." 824. 2010. [3] Bendek, Mathias, Sabine Bergner, Tanja Konen, Andreas Fink, and Aljoscha Neubauer. "EEG Alpha Synchronization Is Related to Top down Processing in Convergent and Divergent Thinking." Neuropyschologia, 3506. 2011. [4] Klimesch, Wolfgang. "Klimesch W. EEG Alpha and Theta Oscillations Reflect Cognitive and Memory Performance: A Review and Analysis." Brain Research Reviews, 644. 1999. [5] Polikar, Robi. "The Wavelet Tutorial." The Engineer s Ultimate Guide to Wavelet Transform. 10. 2006. [6] Q uiroga, R. Quian, and M. Schürmann. "Functions and Sources of Event related EEG Alpha Oscillations Studied with the Wavelet Transform." Clinical Neurophysiology, 644. 1999. [7] Mirowski, Piotr, Deepak Madhavan, Yann LeCun, and Ruben Kuzniecky. "Classification of Patterns of EEG Synchronization for Seizure Prediction." 4. 2009.