Python is one of the fastest growing programming languages due to its readability and flexibility and is widely used in industry today. Python's rise in popularity is also due to the broad set of libraries available for Machine Learning and Data Science.
The course aims to teach students the fundamentals of Python and several packages specifically designed for Machine Learning and Data Science. The aims of the course are:
- to introduce the fundamental features of the Python programming language to students;
- to enable students to write procedural, object oriented and functional programs in Python;
- to introduce some of the most widely used modules from the Python standard library;
- to help students gain a good understanding of, and ability to use, common design patterns;
- to introduce several widely used and foundational Python Machine Learning and Deep Learning libraries;
- to present key Python tools and allow students to apply them in order to become effective Python programmers.
After the module, students will be able to:
- devise and evaluate programs using standard programming constructs in Python (LO1);
- assess and write procedural, object oriented and functional code in Python (LO2);
- create, select, and apply appropriate techniques and relevant library software in Python to solve a given problem (LO3);
- structure and reorganize Python programs with appropriate design patterns (LO4);
- adapt, combine, and apply relevant pre-processing steps and standard Machine Learning algorithms for classification tasks (LO5).
- Intro to (Python) programming
- Introduction to Linux (terminal, ssh)
- running Python scripts (interactive sessions, command-line, redirecting output)
- Basic language elements
- variables and data types (numbers, lists, sets, tuples, strings, dictionaries)
- control flow
- comprehension (list, set, dictionary)
- main method
- string manipulation
- Functions (arguments, recursion)
- Object-oriented programming
- Scripts, modules, packages
- Standard library (operating system functionality, persistence, regular expressions, concurrency, argparse)
- Functional programming ((built-in) higher order functions)
- File manipulation
- file handling
- Exception handling
- Testing in Python
- Data processing and Machine Learning/Deep Learning concepts:
- Numpy (arrays, array manipulation)
- Pandas (data analysis and manipulation)
- Scikit-learn (training and evaluating classifiers)
- Keras (training deep learning classifiers)
- Design practices (Dependency injection, idiomatic Python, refactoring)
1st week of 2h lectures and 4h labs.
7 weeks of 4h lectures and 6h labs.
New topic(s) each week supported by laboratory sessions.
Wrap up lecture and a revision lecture at the end of the course.
Mock test at the end of the course to prepare for the exam.
There will be 2 computer-based programming exercises in Python for students to practice the topics that have been covered during the course. Students will work independently to solve the exercises having 2 weeks to complete each coursework. It should be possible to complete each coursework in the allocated lab sessions.
The first coursework will focus on the application of basic language elements and object-oriented programming to solve various tasks, making use of standard programming constructs and relevant library software. Learning outcomes LO2 and LO3 will be assessed. The coursework will be set in week 3.
The second coursework will focus on data processing and using Machine Learning/Deep Learning libraries to solve classification problems. Learning outcome LO5 will be assessed. The coursework will be set in week 6.
The computer-based exercises will be submitted via LabTS which allows for auto-testing to pick up basic syntax errors. Submissions will then be marked by TAs to give detailed feedback. The marked exercises will be returned within 2 weeks of the submission deadline.
There will be a 2h computer-based exam in the first week of the spring term, intended to cover all learning outcomes.
Detailed written feedback will be provided by teaching assistants for the coursework assignments. The lecturer and teaching assistants will be available to answer questions and provide direct verbal feedback during the laboratory sessions.
Second edition., Sebastopol, CA : O'Reilly Media
Second edition., Beijing : O'Reilly
Introduction to Computation and Programming Using Python : With Application to Computational Modeling and Understanding Data
Third edition., The MIT Press
Introduction to Computation and Programming Using Python with Application to Understanding Data, Second Edition
Second Edition., The MIT Press
CreateSpace Independent Publishing
First edition., O'Reilly
Second edition., Sebastopol, CA : O'Reilly Media, Inc.
Learn Python 3 the Hard Way: A Very Simple Introduction to the Terrifyingly Beautiful World of Computers and Code
O'Reilly Media, Incorporated