Azure Notebooks at Imperial College Machine Learning Society
My name is Harry Churchill and I am currently a second-year undergrad studying Mech Eng at Imperial College London and a Microsoft Student Partner. I am interested in cryptography, all things space exploration and the field of machine learning.
Machine Learning Society
Earlier this year, I was part of a group of students that set up and now run the machine learning society here at Imperial. As an incredibly exciting area with relevant research affecting all the departments at Imperial, we received a great level of interest and response to our launch event. We had a really good group of new members and now we had to provide the events and opportunities that would help engage with and develop the future of machine learning. Over the last term we ran the society with three main areas of focus: supervising projects, organising events and a teaching syllabus. This article will focus more on the teaching and content that we have been developing as a society.
Scenes from our launch event – Imperial College London, 31st January 2018
Teaching
The aim of the teaching is to create a syllabus that can be delivered to a live class or self-taught by students in their own time. We want to cater for all learning styles and levels and so have been experimenting with different methods of delivering content over the last term. Our first public teaching was in the form of two back-to-back sessions held every Wednesday (ML Wednesdays). The first of the two sessions (Ground Zero) was aimed at total beginners. This course aimed to take people from no coding knowledge through to being able to implement complex algorithms within the space of a term. The Ground Zero sessions covered topics such as: ‘Introduction to Python’, ‘Linear Regression’ and ‘Neural Networks’. The second session (In Too Deep Learning) was aimed at people with prior knowledge of, or experience with, the subject. In Too Deep Learning covered areas such as: ‘Introduction to PyTorch and Linear regression’, ‘Convolutional Neural Networks’ and ‘General Adversarial Networks’.
The course content from both sessions can be found in the following libraries:
Ground Zero:
https://notebooks.azure.com/imperial-machine-learning/libraries/Ground-Zero
In-Too-Deep Learning:
https://notebooks.azure.com/imperial-machine-learning/libraries/in-too-deep-learning
Weekly Sessions
The two weekly sessions featured live examples and teaching from the front of the class, a Whatsapp chat to help answer students’ questions without disrupting the flow of the lesson and (of course) plenty of free pizza thanks to our sponsors.
Our weekly sessions took place every Wednesday within Imperial
Non-Computing Background
One thing we started to notice is that a lot of people came to us with fantastic ideas and concepts but little understanding of how to implement them. People from non-computing backgrounds had great individual subject knowledge and wanted to learn more about machine learning and how they could apply it to their relevant fields. Whether it be for them to develop their own products or translate pseudocode into machine-readable syntax, we want to develop a syllabus that is both accessible to everyone and easy to understand. This would hopefully allow the people that want to the opportunity to engage with and contribute to the research and projects taking place within and beyond their departments.
ML Easter Bootcamp
Following on from the weekly sessions, and to meet the demand to provide more teaching courses for our members, we organized a several-day course over the Easter holidays (ML Easter Bootcamp). Involving a short and sharp crash course, this gave people the opportunity to learn outside their busy term time schedules. As part of our evolving teaching, a few changes were made to the course – reflecting the things we learned over the last term as well as nature of this short boot camp. This course aimed to allow people with no machine learning experience to develop their theoretical and practical capabilities.
ML Easter Bootcamp library:
https://notebooks.azure.com/imperial-machine-learning/libraries/2018-Easter-Bootcamp
The ML Easter Bootcamp Event took place during the first weekend of April
Lessons Created with Notebooks
The key for this was to deliver content in an easy and accessible manner for our students. For this course, the syllabus from our weekly sessions was developed and taught in a Jupyter Environment. Whereas beforehand, the lessons were taught as and then uploaded to our Github as .py files, the new content was uploaded to an Azure Notebook library in the format of .jpynb files. This made delivering the content far easier, as well as making it simpler and more interactive for students to self-learn the course in their own time. The lack of setup required, ability to read the theory alongside intractable-inline coding examples, as well as the accessibility of this setup across most devices, made this a perfect format for delivering our content. As we prepare for the new academic year, and write the next syllabus over the summer, we are excited to integrate more of the Notebooks features within our lessons and uploads.
When asked for feedback on the use of Notebooks and teaching in the Jupyter environment, two of our course leaders had to say the following:
"It has saved me hours in installing dependencies, fixing students' installations of linux and getting cloud virtual machines set up. All they need now is a microsoft account and they're good to go." - Haron Shams, Imperial College London MLSoc Cofounder, President and Course Leader.
"Azure notebooks have greatly enhanced my capability to teach, and for students to learn, effectively. Often the algorithms that we want to demonstrate are of significant size, but can be broken down into smaller blocks when teaching from a notebook. This allows the purpose of different blocks of code to be understood more fully and makes debugging substantially easier." - Harry Berg, Imperial College London MLSoc Cofounder, President and Course Leader.
Introduction to Python
For those looking to get started with Python, some extracts from 'Day 0' of the ML Easter Bootcamp will follow below (alongside an extract from one of our earlier lessons just to show why teaching with Notebooks makes so much sense!), if this is something that you have already covered please skip to the bottom of this article where you can check out the links to our Github and Azure libraries for more advanced content or projects.
When starting from the very beginning it is important to introduce people to some basic syntax and features of coding in Python. Code is just a series of instructions, which are read sequentially by our python interpreter, which interprets it into lower level code, which our computer can execute. In a lesson we can easily explain and demonstrate concepts to people, such as below where we are introducing the concept of variables.
The above example is taken from the 'week_0-Intro_to_python.py' file and shows the extract of one of our earlier weekly lessons introducing students to the use of variables. The above example could be explained properly during a class with a teacher, however on your own, it may be harder to work out what is going on as a beginner. To save the need to open multiple windows and applications, as well as cluttering the code with lengthy comments, we adapted the above example to a Notebook format as shown below.
As you can hopefully see, the theory can be explained and then practiced easily within the same environment. Everything is clear - you can distinguish between the sections of code and teacher's explanation, making for a more fluid lesson.
When learning languages such as Python, it is very difficult to become good at it by just copying example exercises and projects. It is therefore important to have a play around with the code as it is explained to you and learn the meaning of the different syntax. As shown in the above figure, errors have been deliberately left in the code, the student is then able to try and repair these in the malfunctioning window or proceed to the next segment where the correct approach is displayed. The comments are there to guide the lesson, however it is good practice to edit the code and learn for you what can be edited or removed and the affect this has on the outcome.
It is particularly important, at the early stages of learning a language, to get used to the syntax and what basic features or built in functions are commonly used to build up more complex ones with the language in question. Below is an example of how information can be stored in and called upon from a list format.
Hopefully the above section is a good example of the learning material created by our society and if you are a novice coder looking to get into Python, it may encourage you to investigate some of our courses or one of the many others using the Notebook format.
Continue the Syllabus or Follow our Channels for Future Content
If you are interested in looking through the complete lesson or checking out the entire course, please check out our Azure and Github profiles below. The 'ML Easter Bootcamp' features all the daily lessons as .jpynb files and so you can go through and interact with the entire course on your browser. There is no need for you to try and fit a Youtube window, coding forum tab and IDE into a 13-inch laptop screen, you can learn and interact with the code all in your browser.
Check out our various profiles and channels for more machine learning events or for more learning content:
Azure Profile: https://notebooks.azure.com/imperial-machine-learning
Github: https://github.com/ML-Society
Azure for Student $100 of Credit and over 25 free Azure Services for Students https://aka.ms/azure4students
Learn More about the ML Society at Imperial College