This study examines modelling with machine learning. In the context of a yearlong data science course, the study explores how upper secondary students apply machine learning with Jupyter Notebooks and document the modelling process as a computational essay incorporating the different steps of the CRISP-DM cycle. The students’ work is based on a teaching module about decision trees in machine learning and a worked example of such a modelling process. The study outlines the students’ performance in carrying out the machine learning technically and reasoning about bias in the data, different data preparation steps, the application context, and the resulting decision model. Furthermore, the context of the study and the theoretical backgrounds are presented.