Machine learning for kids
Using Scikit-learn with Python is a great module to introduce kids to artificial intelligence and machine learning. The key factors to successfully getting across some of the basic concepts is to firstly keep it simple — don’t go into all the nitty-gritty of models, features and train-test split functions. Keep it practical — using tools such as Google’s Colab allows students to easily experiment with the data and the model. Finally, and probably the most important tip, is to provide a context that kids can understand and relate to.
The situation
Firstly, let’s begin by describing a situation that kids can relate to — data was collected for 6 students. Everyday for a week (5 days), they recorded the number of hours that students had studied for an exam. For example, David studied the following number of hours over the week:
| Day | Hours studied |
| --------- | ------------- |
| Monday | 2 |
| Tuesday | 1 |
| Wednesday | 1 |
| Thursday | 3 |
| Friday | 4 |
X and y variables
This data is then stored inside a Python list as [2, 1, 1, 3, 4].
More students data can be added to the X variable, so that we have a list of students and their hours studied over the week: