John Chapin

Loudoun County Public Schools

School Social Media:

I teach computer science at the Academies of Loudoun relatively new public magnet high school in northern Virginia. I am the Computer Science (CS) pathway leader. Students who choose the CS pathway take four years of a pre-planned path of CS classes.  Our goal for the students was to give them a good foundation in CS in the first two years.  The students take an introduction to CS course freshman year and AP CS their sophomore year. The junior year students take junior research, which includes Machine Learning (ML), app development with React Native, and Web development. The students then use these skills to create their computational artifacts (e.g., apps, programs, websites, ML algorithms) during their senior year research course. The purpose of providing ML is to give students not only insight into ML and its role, but also the tools to do their own machine learning research and analysis. 

AI has a place in the high school course offering. AI is increasingly more accessible to high school students because of powerful libraries like Keras and Numpy as well as powerful GPU’s and free cloud AI platforms such as Colab notebooks by Google. Many students are taking AP Cs by sophomore year and are looking to keep learning CS. AI is an excellent subject for not only the advanced CS programming student, but it can even be taught as a non-programming course that is an overview of the different AI algorithms and ethics issues. 

AI is a vast subject. The course I teach focuses more on machine learning and less on traditional AI. The goal of our curriculum is to use programming to give students a deep understanding of the machine learning concepts as well as provide them with an introduction to some of the powerful ML libraries that they can use (e.g., Keras). The students learn to program linear and logistic regression algorithms in Python. Students gain a grasp of the vocabulary (e.g., features, weights), the role of matrices and the math (especially calculus), and the essential algorithms such as the cost function, how weights are adjusted and how regression works. Some of the classroom activities are unplugged such as calculating linear regression and backpropagation by hand. 

ML is powerful because it can be applied to issues and problems that are relevant to the student. The students complete a capstone ML project of their choosing. Many students use ML as a tool for their science fair projects. One student created a ML algorithm to detect skin cancer from a photo. She tested it out on herself, and it identified a possibly cancerous mole. She went to the dermatologist, and it was identified as pre-cancerous and removed. It does not get any more relevant than that

I am a self-taught ML programmer. I was fortunate to have excellent advice and help along the way. The Academies of Loudoun decided to offer ML in the Spring of 2018. At the time, I had never programmed in Python and knew nothing about AI. I was overwhelmed with the vocabulary, concepts, programming tools, and learning Python (e.g., Anaconda, Jupyter notebooks, perceptron, backprop). I looked online for examples of AI courses in other high schools and discovered that there some focused on AI, but that there were none that focused on ML. 

I started to learn ML with Andrew Ng’s ML course on Coursera. I am fortunate to partner with my co-teacher Peter Randall. Although he was new to Python and ML like me, he was an invaluable partner and sounding board as we both became familiar with ML. Even though we were helping each other, we still had a lot of questions. Some questions were specific to the content and other questions focused on how to take an upper-level college CS course and present it for high school students.

 Luckily we had some outside help. In the summer of 2018, the researchers at the Howard Hughes Medical Institute, Janelia campus, reached out and offered to help us create a machine learning course. HHMI Janelia has world-class ML computer scientists. The Janelia researchers are working on mapping the fly’s brain and use a lot of ML to help them. As I went through the Andrew Ng Coursera course, I would meet for 2 hours a week with several members of the ML team at Janelia. They would help me not only understand ML better but also help me make decisions about what concepts were critical for students to understand and internalize.

I have also received a lot of support from the administration at the Academies of Loudoun (ACL) as well as Loudoun County Public Schools. Every student in the CS pathway at ACL receives a computer as well as the limited administration rights. Their computers are monitored, and they need to ask for permission to install software. This flexibility allows us to use any libraries that we need to on the students’ computers

One of the most exciting things about teaching and creating the ML course is the fact that it is a cutting edge technology. The novelty of ML is also the most challenging aspect. All of the tools needed for ML algorithm creation are relatively new, and there are very few educational materials developed to help new learners. Numpy, Python, Jupyter notebooks, Keras were all developed in the last 3-5 years. Because of this, we have had to create all of the curriculum materials from scratch. 

We used the same sequence of topics as the Andrew Ng course. His videos explaining the math and the ML concepts are still the best I have seen. Unfortunately, most of the activities and labs we were not able to use because they required the Octave programming language. We substituted Python for Octave as the programming language. This sequence of our course requires students to code algorithms from scratch. After the students code some of the algorithms from scratch using classic datasets like the Titanic, MNIST, and Iris, they then move on to using the advanced libraries Tensor Flow and Keras. I used the Deep Learning with Python book by Francois Chollet as a basis to teach the students Keras. 

One of my favorite activities that we do as a class is the Zillow house price prediction lab. I used the Zillow app to create a small database of houses in Loudoun County with several essential features and a house price. On the first day of class, I have the students go to a whiteboard in pairs and try to use math to create a model that can predict the house price based on the parameters given. They can use excel if they want. Most students end up using a process very similar to the linear regression ML algorithm. They determine which parameters to choose. Some even convert non-numerical data like detached/townhouse to numerical data. Most students then choose some initial weights for the parameters and then calculate a cost function (how much their predicted price was different than actual price). They then adjust their weights based on their cost function. This activity provides an excellent grounding for future conversations about the process and provides a real example of the new vocabulary that will be introduced. 

I also have a google doc that has a list of resources that I have found useful.