Organisation

Time only SS
Time Monday, 08.15h-11.30h
Room Zoom Meeting
Credits 3 SWS / 5 ECTS
Exam Lab Work

Announcements

  • First lesson in term SS 21: 22.03.21

Important notice for the summer term 2021: The course will initially be offered as a synchronous distance learning course during the SARS-CoV-2-related restrictions in term SS 21. I will post the corresponding Zoom link to the group of online registered users in the Persönlicher Stundenplan before 22.03.2021. The timetable according to the Starplan will apply. If or when we may meet again in lecture halls, the room indicated in Starplan will apply.

Prerequisites for participation

  • Successful completion of either the CSM Machine Learning Lecture or the CSM Object Recognition Lecture

Structure, Contents, Documents

In this lab student-groups must implement selected applications from Artificial Intelligence, Machine Learning, Object Recognition and Natural Language Processing. All applications must be implemented in Python Jupyter-Notebooks. The Python machine learning libraries scikit-learn, Tensorflow and Keras will be applied.

I recommend to download Anaconda for Python 3.7 or 3.8. Then a new virtual environment shall be created by conda create -n pia python=3.6 anaconda. In this virtual environment use pip install to install tensorflow, keras, gensim, and other required modules.

Each of the lab-exercises (applications) will be graded. The final grad of the course is the mean of the exercise grades.

New, from term SS21 is the combination of the lectures PIA and Selected Topics of Deep Learning (STDL). Actually the lab exercises of PIA has been extended and partitioned into these two lectures. As depicted below the first 5 exercises are assigned to PIA, the remaining 4 exercises are assigned to STDL. The 2 modules therefore run consecutively. Students, which like to execute all exercises must register for PIA and STDL. It is also possible to register only for PIA. It is not possible to register only for STDL, because it makes no sense to skip the intro in the first part and start with the 6.th exercise.

Gitlab Repo for all resources

Lecture Contents Document Links
22.03.2021 Short Introduction and Registration
29.03.2021 Data Mining Process in Scikit-Learn Instruction [.html], Instruction [.ipynb], churnPrediction Data, Pics Folder Pics archive must be decompressed and saved in the same directory as the notebook
12.04.2021 Introduction to Tensorflow Instruction [.html], Instruction [.ipynb]
19.04.2021 Generative Adversarial Networks (GAN) in Tensorflow Instruction [.html], Instruction [.ipynb]
26.04.2021 Generative Adversarial Networks (GAN) in Tensorflow
03.05.2021 Word Embeddings and Deep Neural Networks for Document Classification (Keras) Instruction [.html], Instruction [.ipynb], NewsFeed Data, Pics Folder Pics archive must be decompressed and saved in the same directory as the notebook
10.05.2021 Music Generation (Tensorflow) Instruction RNN Sequence Prediction [.html], Instruction RNN Sequence Prediction [.ipynb]
17.05.2021 Music Generation (Tensorflow) Instruction RNN Sequence Prediction [.html], Instruction RNN Sequence Prediction [.ipynb]
———— —————– ————————————-
31.05.2021 Reinforcement Learning (1) Instruction [.html], Instruction [.ipynb], Instruction [.html], Instruction [.ipynb] , RL_pics Folder Pics archive must be decompressed and saved in the same directory as the notebook
07.06.2021 Reinforcement Learning (2) Instruction Q-Learning [.html], Instruction Q-Learning [.ipynb], RL_pics Folder
13.06.2021 Deep Reinforcement Learning with Tensorflow Instruction DQN [.html], Instruction DQN [.ipynb], RL_pics Folder
21.06.2021 Deep Reinforcement Learning with Tensorflow
28.06.2021 Graph Neural Networks Instruction DQN [.ipynb]

Description of the Lab-Exercises for both parts - PIA and STDL

1. Introduction Machine Learning Process in general

In this lab-exercises the entire Data Mining process will be implemented using an example for churn-prediction:

  • Access and clean data
  • Understand data: Descriptive statistics and visualization
  • Transformation of categorical attributes
  • Feature Selection and -Extraction
  • Normalisation and Scaling
  • Test, evaluate and optimize learned models
  • Performance measures and visualization of performance

Goals of this lecture:

  • Understand all steps required to implement and solve typical machine-learning tasks
  • Know how to define and design machine-learning projects

2. Introduction to Tensorflow

This lecture will introduce the Tensorflow framework for Deep Learning. The students will build a simple neural network to classify the MNIST dataset.

Goals of this lecture:

  • Understand the basics of Tensorflow Graphs, lazy execution and why this is important for performance
  • Build a basic classifier for the MNIST Dataset using Tensorflow
  • Train the classifier using mini-batches

3. MNIST GAN (Tensorflow)

In this lecture the students will build a generative adversarial neural network (GAN) to generate images similar to the MNIST dataset.

Goals of this lecture:

  • Understand the basics of GANs
  • Understand more advanced Tensorflow features (Variable Scopes, Variable reuse, Tensorboard)
  • Build and train a simple GAN network to generate MNIST-like images
  • Use the Deeplearn machines @ HdM

4. Word Embeddings and Text Classification (Keras)

This lecture comprises:

  • Access and preprocess text data
  • Distributional semantics and word-embeddings
  • Learn word-embeddings from Wikipedia dump
  • Apply word-embeddings for text classification with deep neural networks (CNNs)

Goals of this lecture:

  • Understand the concept and potential of word-embeddings
  • Know how to build a deep neural network for text-classification

5. Sequence Prediction (Tensorflow)

This lecture will introduce how recurrent neural networks (RNNs, LSTMs) can be used to learn on temporal sequences of data to predict the next values in the future. For this, the students will build and train a LSTM network that comopses new music given an initial seed of music. The LSTM will be trained on classical music.

Goals of this lecture:

  • Understand the basics of RNNs and LSTM networks
  • Understand how RNNs are able to predict the future (and why uncertainty increases over time)
  • Build a model that can compose new music

6. Reinforcement Learning (Tensorflow)

In this lecture the students will build various reinforcement learning agents. Starting from simple gridworld environments, the goal is to implement and understand the core concepts of “classical” reinforcement learning.

Goals of this lecture:

  • Understand/Recap the core concepts of reinforcment learning (agent-environment loop, observations, policies, exploration, etc.)
  • Solve a gridworld environment with dynamic programming
  • Implement a gridworld agent with tabular Q-learning

7. Deep Reinforcement Learning (Tensorflow)

In this part the Deep Q-Learning Algorithm that was used by Mnih et al. to play Atari Video games will be implemented. The resulting agent is called Deep Q-Network agent (or shorter DQN agent) because it uses a Deep Neural Network to approximate the value function.

Goals of this lecture:

  • Understand Deep Q-Network (DQN)
  • Implement a video game playing agent with Deep Q-Networks

8. Graph Neural Networks

Graph based deep learning is currently one of the hottest topics in Machine Learning Research. In the NeurIPS 2020 conference GNNs constituted the most prominent topic, as can be seen in this list of conference papers. However, GNNs are not only subject of research. They have already found their way into a wide range of applications. Graph Neural Networks are suitable for Machine Learning tasks on data with structural relation between the individual data-points. Examples are e.g. social- or communication- network analysis, traffic prediction, fraud detection and the classification tasks in this exercise.

In this exercise we access data from spotify and train a Graph Neural Network for predicting the genre of music-tracks.

The goals of this lecture are:

  • Understand the basic concepts of Graph Neural Networks and their application categories
  • Learn to implement a Graph Convolutional Layer in Keras by subclassing from the abstract Keras class layer.
  • Learn to implement a Graph Convolutional Network (GCN) for Node Classification by subclassing from the Keras class model.
  • Apply a Graph Convolutional Network to predict the genre of a song. For this a comprehensive set of playlists and tracks is accessed from spotify via the Python API spotipy.