Supervised Learning

Autoencoders

[Download this notebook](12 - Autoencoders.ipynb) I did my best to minimize the training time. I had saved a model that was trained already. However, the server does not play along. Therefore it is best to just do something else for an hour when training. You don’t have to train 100 epochs, you can end the training early via Kernel > Interrupt Kernel. In this lesson you’ll learn: what an autoencoder is.

Bayesian Linear Regression

Download this notebook This notebook shows the advantage of Bayesian Linear Regression vs. regular Least-Squares-Estimation-based Linear Regression with respect to outliers. The Bayesian part of the approach shown here is that the error’s/noise’s standard deviation $\sigma$ is now not necessarily constant, but a random variable, too, bounded by a lower bound $\sigma_0$ and an upper bound $\infty$. Standard Linear Regression Assumption: f(x) = a + bx with measurement $y_i = f(x_i) + \epsilon_i$ with $\epsilon_i \sim \mathcal{N}\left(0,\sigma_0^2\right)$.

CNN & Transfer Learning

[Download this notebook](10 - Transfer Learning.ipynb) In this lesson you’ll learn: what is meant by transfer learning. how to load and customize pre-trained models. how to read images from folders into Python. Last week you developed a CNN that can recognize numbers. Today, we focus on taking advantage of pre-trained neural networks. First, you will train a model that can distinguish between various breeds of dogs and cats. In the training task, you will use ResNet to detect pneumonia in X-ray images.

Convolutional Neural Network

[Download this notebook](09 - Convolutional Neural Network.ipynb) This week we are looking at convolutional neural networks. Convolutional neural networks (CNNs) are used primarily, but not exclusively, for image recognition. Unlike the neural networks we have seen so far, CNNs can read images as a matrix. This means that local context is not lost by flattening the image. Otavio Good. 2017 “A Visual and Intuitive Understanding of Deep Learning” O’Reilly AI Conference import torch from torch import nn import pandas as pd import numpy as np from matplotlib import pyplot as plt from torch.

First Neuronal Network

[Download this notebook](07 - First Neural Net.ipynb) In this lesson you’ll learn: how one-hot encoding works. how to program a simple neural net in Python. Before we train the neural network, the first thing we need to do is load the relevant libraries and functions. import numpy as np from matplotlib import pyplot as plt %matplotlib inline Activation functions def sigmoid(x): return 1 / (1 + np.exp(-x)) # np.exp() = e^() def softmax(x, axis=1): return np.

Graph Neural Networks

[Download this notebook](13 - Graph Neural Networks.ipynb) In this lesson you’ll learn: how molecules can be represented as graphs. how basic Graph Neural Networks work. how to write a Graph Neural Network as a Pytorch class. Graph Neural Networks are still a relatively new class of algorithms. Intuitively, molecules can be represented very easily as a (mathematical) graph. The bonds of a molecule correspond to the edges of the graph and the atoms to the nodes.

Linear Algebra

[Download this notebook](06 - Linear Algebra for NN.ipynb) In this lesson you’ll learn: about vectors and matrices and how to do simple calculations with them in Python. how to calculate the derivative of simple functions. how the chain rule works and why it is so useful for neural networks. Today we will explain the essential mathematical principles for neural networks. The first essential mathematical concept is the vector. A vector represents a point in a space that is described by several values.

Logistic Regression

Download this notebook A typical task solved using machine learning algorithms is the assignment of instaces to different classes - a so-called classification. Despite the somewhat misleading name, logistic regression is a method to handle classification problems, in particular two-class classification problems. Calculating the probability that an instance belongs to a certain class, the classification based on logistic regression takes place. Stepping through this notebook, you will get familiar with the fundamental concepts of logistic regression.

Pytorch

[Download this notebook](08 - PyTorch.ipynb) In this lesson you’ll learn: how to program a simple neural net using PyTorch. how to implement more advanced layers in your neural net (Dropout, Batchnorm). about more advanced optimisation (Momentum, adam). Last week you programmed a simple neural network yourself. As mentioned earlier, it is not necessary to program every net yourself. Certain software packages take care of many of the inconveniences of creating and training nets “by hand”.

Recurrent Neural Networks

[Download this notebook](11 - Recurrent Neural Networks.ipynb) Recurrent Neural Networks (RNNs) are another special form of neural networks. RNNs are mainly used for sequences that are arranged in a fixed order. In these cases, the order of the individual elements of the sequence is often crucial for the interpretation of the whole sequence. Languages as a classical example lend themselves immediately. This is because the ordering of a sentence influences the interpretation of the individual words.