DP CS
These Making With Code-style labs are designed to be integrated into the DP curriuclum. We believe that the Constructionist approach Making With Code takes in introductory Shuyuan courses provides students with grounding they can use to deeply understand and apply the accelerated content of the DP courses. However, machine learning is so different from the standard CS content that it makes sense to embed MWC-style labs into DP.
The sequence of labs is:
- Estimation, which introduces parameters, loss, and training by fitting models—first an interactive toy, then linear regression and association rule mining on a real public health survey.
- Classification: Features, which builds a spam detector, progressing from hand-written rules to a logistic regression model trained on hand-designed features, and introduces precision, recall, and F1 for honest evaluation.
- Classification: Networks, which tackles handwritten digit recognition, showing the limits of hand-designed features and motivating multi-layer perceptrons and convolutional neural networks, built from scratch.
- Reinforcement Learning, which trains an agent to play games without being told the rules, starting from Q-learning from scratch and culminating in training an agent on a new game, where students form their own hypotheses, tune settings like learning rate and network size, and document what worked in a training log.
About the math...
These labs intentionally avoid mathematical rigor. This design decision has significant long-term costs (it risks giving students a serious misconception about the nature of computer science, and even risks steering away from Papert's "powerful ideas") but I still think it's the right way to go for early CS study given the toxic relationship many students have developed toward mathematics. It feels important not to introduce a mathematical prerequisite (and thereby lose some of the students who might benefit the most from a fresh start exploring mathematical ideas with curiosity), and also feels important to preserve as much of the open-ended, project-based approach which distingishes Making With Code. (We would need to abstract away some of the math anyway, since rigorously treating ML definitely requires at least calculus, linear algebra, and statistics.)
Standards alignment
Note that four standards are not addressed in these labs: A4.1.1 is a very general standard which will be better-addressed in the introduction and conclusion of the overall study of machine learning. There is currently no lab on clustering (A4.3.4), but one could be developed fairly easily; it is conceptually less-challenging than the topics we focused on for labs. There is also no lab on genetic algorithms (A4.3.7); this (in my subjective opinion!) just doesn't feel like the most compelling or worthwhile topic to spent a lot of time on in students' first introduction to ML.
Association rule mining (A4.3.5) is also intentionally excluded. An earlier draft of the Estimation lab covered it alongside linear regression, but the two are built on different paradigms. For students just forming their first mental model of what "fitting a model" means, I want to avoid confusion and misconceptions.
| Concept | Subconcept | Standard | Coverage |
|---|---|---|---|
| A4 Machine Learning | Machine learning fundamentals | A4.1.1. Describe the types of machine learning and their applications in the real world. |
|
| A4 Machine Learning | Machine learning fundamentals | A4.1.2. Describe the hardware requirements for various scenarios where machine learning is deployed. |
|
| A4 Machine Learning | Data preprocessing (HL only) | A4.2.1. Describe the significance of data cleaning. | |
| A4 Machine Learning | Data preprocessing (HL only) | A4.2.2. Describe the role of feature selection. | |
| A4 Machine Learning | Data preprocessing (HL only) | A4.2.3. Describe the importance of dimensionality reduction. | |
| A4 Machine Learning | Machine learning approaches (HL only) | A4.3.1. Explain how linear regression is used to predict continuous outcomes. | |
| A4 Machine Learning | Machine learning approaches (HL only) | A4.3.2. Explain how classifications techniques in supervised learning are used to predict discrete categorical outcomes. | |
| A4 Machine Learning | Machine learning approaches (HL only) | A4.3.3. Explain the role of hyperparameter tuning when evaluating supervised learning algorithms. | |
| A4 Machine Learning | Machine learning approaches (HL only) | A4.3.4. Describe how clustering techniques in unsupervised learning are used to group data based on similarities in features. |
|
| A4 Machine Learning | Machine learning approaches (HL only) | A4.3.5. Describe how learning techniques using the association rule are used to uncover relations between different attributes in large data sets. |
|
| A4 Machine Learning | Machine learning approaches (HL only) | A4.3.6. Describe how an agent learns to make decisions by interacting with its environment in reinforcement learning. | |
| A4 Machine Learning | Machine learning approaches (HL only) | A4.3.7. Describe the application of genetic algorithms in various real-world situations. |
|
| A4 Machine Learning | Machine learning approaches (HL only) | A4.3.8. Outline the structure and function of ANNs and how multi-layer networks are used to model complex patterns in data sets. | |
| A4 Machine Learning | Machine learning approaches (HL only) | A4.3.9. Describe how CNNs are designed to adaptively learn spatial hierarchies of features in images. | |
| A4 Machine Learning | Machine learning approaches (HL only) | A4.3.10. Explain the importance of model selection and comparison in machine learning. | |
| A4 Machine Learning | Ethical considerations | A4.4.1. Discuss the ethical implications of machine learning in real-world scenarios. | |
| A4 Machine Learning | Ethical considerations | A4.4.2. Discuss ethical aspects of the increasing integration of computer technologies into daily life. |