Learn the fundamentals of machine learning to help you correctly apply various classification and regression machine learning algorithms to real-life problems using the Python toolbox scikit-learn.
Machine learning classification and regression techniques have potential uses in various engineering disciplines. These machine learning models allow you to make predictions for a category (classification) or for a number (regression) given sensor data, and can be used in, for example, predicting properties of objects (such as their weight or shape).
Using hands-on and interactive exercises you will get insight into:
Machine learning and its variants, such as supervised learning, semi-supervised learning, unsupervised learning and reinforcement learning.
Regression techniques such as linear regression, K-nearest neighbor regression, how to deal with outliers and evaluation metrics such as the mean squared error (MSE) and mean absolute error (MAE).
Classification techniques such as the histogram method, the nearest mean (or nearest medoid) method and the nearest neighbor classifier. We cover the classification setting and important concepts such as the Bayes classifier and the Bayes error, the optimal classifier in theory.
Training models using (stochastic) gradient descent and its variants, we learn how to tune this optimizer, and how to use it to construct a logistic regression classification model.
Overfitting means a classifier works well on a training set but not on unseen test data. We discuss how to build complex non-linear models, and we analyze how we can understand overfitting using the bias-variance decomposition and the curse of dimensionality. Finally, we discuss how to evaluate fairly and tune machine learning models and estimate how much data they need for an efficient performance.
Regularization methods can help to mitigate overfitting. We discuss two regularization techniques for estimating the linear regression coefficients: ridge regression and LASSO. The latter can also be used for variable selection.
Classifier evaluation metrics such as the ROC curve and confusion matrix can give more insight into the performance of classifiers. We also discuss what constitutes a “good” accuracy; this is given by so-called dummy-classifiers which are naïve baselines.
Support Vector Machines (SVMs) are more advanced classification models that can provide good performance even in high-dimensional spaces and with little data. We discuss their different variants such as the soft-margin SVM, the hard-margin SVM and the nonlinear kernel SVM.
Decision Trees are simple models that can easily be understood by lay people. They are easy to use and visualize, and instead of a black box they can be easily understood as an interpretable white box model, making them suitable for various applications.
The lectures feature a unique combination of videos mixed with hands-on interaction with machine learning algorithms to stimulate a deeper understanding. In the exercises you apply the algorithms in Python using scikit-learn and in the final project you will further deepen your understanding of the various concepts by building and tuning a machine learning pipeline from start to finish.
What You'll Learn
- Apply common operations (pre-processing, plotting, etc.) to datasets using Python.
- Explain the concept of supervised, semi-supervised, unsupervised machine learning and reinforcement learning.
- Explain how various supervised learning models work and recognize their limitations.
- Analyze which factors impact the performance of learning algorithms.
- Apply learning algorithms to datasets using Python and Scikit-learn and evaluate their performance.
- Optimize a machine learning pipeline using Python and Scikit-learn.
Week 1: Introduction & Regression
This week is an introduction to the course with an overview of the topics. We give a brief introduction to machine learning and its different variants, and we will make a gentle start with regression. In the regression setting, a machine learning model will need to predict a number.
In the introductory part we cover:
- Why use machine learning?
- Machine learning basics and terminology
- The biggest challenge in machine learning
- Machine learning frameworks: supervised, semi-supervised, unsupervised and reinforcement learning
In the regression part we cover:
- The regression setting and its assumptions
- The mean squared error (MSE) and mean absolute error (MAE)
- Outliers in regression
- Linear regression and K-nearest neighbour regression
Week 2: Classification & Training Models
This week we discuss the classification setting and how to train models using gradient descent. In the classification setting, a machine learning model will need to predict a category or class. Gradient descent is an iterative procedure to train models, such as logistic regression and neural networks.
In the classification part we cover:
- Terminology and basics of classification
- Building classifiers using histograms, nearest mean (nearest medoid) classifier, K-nearest neighbour (KNN) classifier
- The Bayes classifier and the Bayes error
- How to use the KNN classifier in practice
In the training models part, we cover:
- The basics of gradient descent
- The three variants of gradient descent: batch, mini-batch and stochastic gradient descent (SGD)
- How to tune gradient descent
- The basics of logistic regression
Week 3: Overfitting & Regularization
This week focuses on overfitting and regularization. Overfitting is the problem where a machine learning algorithm performs well on the training set but does not perform well on new and unseen data. Regularization covers various techniques that aim to solve this problem.
In the overfitting part we cover:
- How to use linear models for nonlinear tasks?
- The bias-variance trade-off and the curse of dimensionality
- How to use learning curves to estimate the amount of data needed
- Cross validation, model selection and hyperparameter tuning
In the regularization part we cover:
- Ridge regression
- LASSO regularization and how it’s used for variable selection
Week 4: Classifier Evaluation & Support Vector Machines
Classifier evaluation delves deeper into the various evaluation metrics for classifiers. In the second part we cover the support vector machine classifier. The support vector machine is a well-known more advanced classification model.
In the classifier evaluation part, we cover:
- What a “good” accuracy means (e.g., naïve baselines/dummy classifiers)
- The confusion matrix (false positive, false negative, costs)
In the support vector machine part (SVM) we cover:
- Basics of the SVM, the margin and the hard-margin SVM
- The soft-margin SVM
Week 5: Decision Trees & Final Project
In this last week we discuss decision trees and you will work on a more in-depth final project. Decision trees are simple and interpretable models that are very user-friendly. The final project will involve building a machine learning pipeline, including hyperparameter tuning and a careful and fair evaluation, to solve a small practical application (MNIST).
In the decision tree part, we cover:
- Basics of decision trees and their terminology
- How to train decision trees with CART
- Overfitting and other pros and cons of decision trees
Week 6: Wrap up
In this week, there will be extra time for questions regarding the earlier weeks and to discuss the final project.
This is a Massive Open Online Course (MOOC) that runs on edX.
- Basic linear algebra
- Basic Python programming skills
- Basic probability & statistics