'We are drowning in information and starving for knowledge.' β John Naisbitt
Machine learning / data science is a subfield of artificial intelligence (AI) that provides systems the ability to automatically learn and improve from experience without being explicitly programmed. Machine learning focuses on the development of computer programs which can access data and use it to learn for themselves. A machine learning algorithm learns by building a mathematical / statistical model from the data. This model can then be used for inference and decision making. Machine learning has become an integral part of many modern applications. It is a cross-topic discipline which comprises computer science, math / statistics as well as domain and business knowledge:
The lecture 'Applied Machine Learning Fundamentals' is supposed to give a general introduction into state-of-the-art machine learning algorithms and their applications. This Readme file provides you with all necessary information. It is structured as follows:
- π Lecture contents
- βοΈ Assignments
- π Exam
- π Python code
- π Literature and recommended reading
- π Data exploration project
- π Additional material
β οΈ Frequently Asked Questions (FAQ)- π Bugs and errors
The following topics / algorithms will be covered by the lecture:
- Introduction to machine learning (click here)
- Motivation and applications
- Terminology
- Key challenges in ML: Generalization, feature engineering, model selection, ...
- Mathematical foundations (click here)
- Linear algebra
- Statistics
- Optimization
- Bayesian decision theory (click here)
- Bayes optimal classifier
- Naive Bayes
- Risk minimization
- Probability density estimation (click here)
- Parametric models
- Non-parametric models
- Gaussian mixture models and expectation maximization
- Supervised learning
- Regression (click here)
- Linear regression
- Probabilistic regression
- Basis functions: Radial basis functions, polynomial basis functions
- Classification I
- k-nearest neighbors (click here)
- Logistic regression (click here)
- Decision trees and ensemble methods (click here)
- Classification II: Deep learning (click here)
- Perceptrons
- Multi-layer-perceptrons and back-propagation
- Deep learning application: NLP (word embeddings, text classification, sentiment analysis)
- Regression (click here)
- Evaluation of ML models (click here)
- Out-of-sample testing and cross validation
- Confusion matrices
- Evaluation metrics: Precision, recall, F1 score, ROC, accuracy
- Cost-sensitive evaluation
- Model selection: Grid search, random search
- Unsupervised learning
- Clustering (click here)
- k-Means
- Hierarchical clustering (divisive and agglomerative)
- Principal component analysis (click here)
- Clustering (click here)
- Lecture summary
A list of abbreviations, symbols and mathematical notation used in the context of the slides can be found here. Please find additional material below.
The assignments are voluntary. All students who choose to participate have to form groups comprising three to four students (not more and not less). The groups do not have to be static, you may form new groups for each assignment. The task descriptions, starter code and data sets for the assignments can be found in the folder 02_exercises. You have two weeks to answer the questions and to submit your work. The solutions are going to be presented and discussed after the submission deadline. Sample solutions will not be uploaded. However, you are free to share correct solutions with your colleagues after they have been graded.
Formal requirements for submissions:
- Please submit your solutions via Moodle (as a .zip file) as well as in printed form. The .zip file must contain one .pdf file for the pen-and-paper tasks as well as one .py file per programming task. Only pen-and-paper tasks have to be printed, you do not have to print the source code.
- Only one member of the group has to submit the solutions. Please make sure to specify the matriculation numbers (not the names!) of all group members so that all participants receive the points they deserve!
- Please refrain from submitting hand-written solutions or images of solutions (.png / .jpg files). Rather use proper type-setting software like LaTeX or other comparable programs. If you choose to use LaTeX, you may want to use the template files located here for your answers.
- Code assignments have to be done in Python. Please submit .py files (no jupyter notebooks).
- The following packages are allowed for code submissions: numpy, pandas and scipy. Please ask beforehand, if you want to use a specific package not mentioned here.
- Do not use already implemented models (e.g. from scikit-learn).
Please make sure to fulfill the above mentioned formal requirements. Otherwise, you may risk to lose points. Submissions which severely violate the specifications might not get any points at all!
Grading details for assignments
Your homework is going to be corrected and given back to you. Correct solutions are rewarded with a bonus for the exam which amounts to at most ten percent of the exam, if all solutions submitted by you are correct (this corresponds to at most six points in the exam). It is still possible to achieve full points in the exam, even if you choose not to participate in the assignments (it is additional). Below you find the function which is used to compute the bonus as well as a legend which explains what the components mean. Please note that this is not a linear function.
Please note: The bonus points will be taken into account in case you have to repeat the exam (i.e. they do not expire if you fail the first attempt). π© Very important: π© Unsurprisingly, the solutions have to be your own work. If you plagiarize in the assignments, you will lose all bonus points!
The exam is going to take 60 minutes. The maximum attainable score will be 60 points, so you have one minute per point. Important: Keep your answers short and simple in order not to lose too much valuable time. The exam questions will be given in English, but you may answer them in either English or German (you are also allowed to mix the languages). Please do not translate domain specific technical terms in order to avoid confusion. Please answer all questions on the task sheets (you may also write on the back-sides).
Exam preparation:
- You will not be asked for any derivations, rather I want to test whether you understand the general concepts.
- The exam will contain a mix of multiple choice questions, short answer questions and calculations.
- Make sure you can answer the self-test questions provided for each topic. There won't be sample solutions for those questions! (This would undermine the sense of self-test questions).
- Some of the slides give you important hints (upper left corner):
- A slide marked with symbol (1) provides in-depth information which you do not have to know by heart (think of it as additional material for the sake of completeness).
- Symbol (2) indicates very important content. Make sure you understand it!
- Make sure you understand the homework assignments.
- Work through the list of 150+ terms which you should be able to explain.
- Solve the mock exam which is officially provided. The solutions will be discussed in the last session of the lecture.
Symbol (1):
Symbol (2):
Auxiliary material for the exam:
- Non-programmable pocket calculator
- Two-sided hand-written cheat sheet (you may note whatever you want)
Exam grading
Since the lecture Applied Machine Learning Fundamentals is part of a bigger module (Machine Learning Fundamentals, W3WI_DS304), it is not graded individually. Instead, the score you achieved in the exam (at most 60 points) will be added to the points you receive in the second element of the module, the Data Exploration Project in the 4th semester (cf. below) which is also worth 60 points at maximum. Your performance in both elements combined will determine the eventual grade. Please note: Even with bonus points included, it is not possible to get more than 60 points for the exam.
Please refer to the official DHBW data science module catalogue for further details.
Machine learning algorithms (probably all algorithms) are easier to understand, if you see them implemented. Please find Python implementations for some of the algorithms (which are not part of the assignments) in the folder 06_python. Play around with the hyper-parameters of the algorithms and try different data sets in order to get a better feeling for how the algorithms work. Also, debug through the code line by line and check what each line does.
You do not need to buy any books for the lecture, most resources are available online. Please find a curated list below:
Title | Author(s) | Publisher | View online |
---|---|---|---|
Deep Learning | Goodfellow et al. (2016) | MIT Press | click here |
Elements of statistical Learning | Hastie et al. (2008) | Springer | click here |
Machine Learning | Mitchell (1997) | McGraw-Hill | click here |
Machine Learning - A probabilistic perspective | Murphy (2012) | MIT Press | click here |
Mathematics for Machine Learning | Deisenroth et al. (2019) | Cambridge Univ. Press | click here |
Pattern Recognition and Machine Learning | Bishop (2006) | Springer | click here |
Probabilistic Graphical Models | Koller et al. (2009) | MIT Press | click here |
Reinforcement Learning - An introduction | Sutton et al. (2014) | MIT Press | click here |
π YouTube resources:
- Machine learning lecture by Andrew Ng, Stanford University
- Support vector machines by Patrick Winston, MIT
- Linear algebra by Gilbert Strang, MIT
- Matrix methods in data analysis, signal processing, and machine learning by Gilbert Strang, MIT
- Gradient descent, how neural networks learn
π Interesting papers:
- Playing atari with deep reinforcement learning (Mnih et al., 2013)
- Efficient estimation of word representations in vector space (Mikolov et al., 2013)
In general, the Coursera machine learning course by Andrew Ng is highly recommended. You can get a nice certificate if you want (around $60), but you can also participate in the course for free (without getting the certificate):
In the exam you will not be asked for content which was not discussed in the lecture. Regard the literature as additional resources in case you want to dig deeper into specific topics. Please give me a hint, if you feel that some important resources are missing. I am happy to add them here.
Please find the material for the project in the folder 05_project.
The material contains:
- Organization and goals of the project
- List of topic suggestions
- Submission details
- Grading details
Have a look at the following slides (unless stated otherwise, these slides are not relevant for the exam):
- Support vector machines (click here, click here)
- Linear SVMs
- Non-linear SVMs and the kernel-trick
- Soft-margin SVMs
- Reinforcement learning (click here)
- Markov decision processes
- Algorithms:
- Policy iteration and value iteration
- Q-learning and Q-networks
- Policy gradient methods
- Probabilistic graphical models (click here)
- Bayesian networks (representation and inference)
- Hidden Markov models and viterbi
- Apriori / association rules (click here)
- Data preprocessing (click here)
- Data mining processes (KDD, CRISP-DM)
- Data cleaning
- Data transformation (e. g. normalization, discretization)
- Data reduction and feature subset selection
- Data integration
- Advanced regression (click here)
- Bayesian regression
- Kernel regression
- Gaussian process regression
- Support vector regression
- Advanced deep learning (not yet available)
Q: Can we get sample solutions for the self-test questions?
A: No. The goal of those questions is that you deepen your knowledge about the contents.
If answers were provided you would probably not answer the questions on your own.
Help me improve the lecture. Please feel free to file an issue in case you spot any errors in the slides, exercises or code. Thank you very much in advance! Please do not open issues for questions concerning the content! Either use the Moodle forum or send me an e-mail for that (daniel.wehner@sap.com).
Β© 2022 Daniel Wehner