In this activity, students will:
- Understand the basics of EEG signals and how they can indicate whether eyes are open or closed.
- Learn what features are in data and how feature extraction (like signal strength) helps classify EEG patterns.
- Explore how machine learning works by training a computer to recognize patterns in EEG data using the k-nearest neighbor algorithm.
- Practice building and testing a simple machine learning model to classify EEG data automatically.
- Evaluate and compare the accuracy and efficiency of human labeling vs. computer predictions.
Required MathWorks® Products (https://www.mathworks.com)
Other Materials
- Printed activity handout ("EEG_Classification_Activity_Handout.pdf")
- Colored markers or pens
- Download or clone the contents of this repository OR click "Open in MATLAB Online".
- Open the "EEG_Activity_Instructor_Guide.pdf" and follow the step-by-step instructions. A quick overview:
- Review the background information in the science primer section of the instructor guide with students.
- Instruct students to complete the activity handout ("EEG_Classification_Activity_Handout.pdf") and practice classifying EEG signals by hand.
- Instruct students to open the Live Script titled: "EEG_Classification_Activity.mlx" in MATLAB and follow the guided activity instructions.
- Guide students through Parts 1-4: students will practice building, testing, and evaluating a simple machine learning model to classify EEG data in MATLAB and compare the results to the predictions they made on the handout.
- If time permits, guide students through Part 5: students will go head to head with the computer in classifying single seconds of EEG data.
- Guide students through a discussion to reflect on the use of machine learning algorithms for data classifcation (and beyond!) and the applications of EEG data.
The license is available in the License.txt file in this GitHub repository.
Copyright 2025 The MathWorks, Inc.
