Newer
Older
# Targeted audience
- Researchers from DBIOL, BSSE and DGESS having no machine learning experience yet.
- Basic Python knowledge.
- Almost no math knowledge.
# Concepts
- two days workshop, 1.5 days workshop + .5 day working on own data / prepared data.
- explain fundamental concepts first, discuss exceptions, corner cases,
pitfalls late.
- plotting / pandas? / numpy first. Else participants might be fight with these
basics during coding sessions and will be disctracted from the actual
learning goal of an exercise.
- jupyter notebooks / conda, extra notebooks with solutions.
- use prepared computers in computer room, setting up personal computer during last day if required.
- exercises: empty holes to fill
- read dataframe from csv or excel sheet with beer features
- do some features vs features scatter plots
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
## Part 1: Introduction (UWE)
- What is machine learning ?
- learning from examples
- working with hard to understand data.
- automatation
- What are features / samples / feature matrix ?
- always numerical / categorical vectors
- examples: beer, movies, images, text to numerical examples
- Learning problems:
- unsupervised:
- find structure in set of features
- beers: find groups of beer types
- supervised:
- classification: do I like this beer ?
example: draw decision tree
### Code walkthrough:
- classification: linear SVM classifier or logistic regression example
- clustering: scikit-learn example to find clusters, tbd: which algorithm
## Part 2a: supervised learning: classification
Intention: demonstrate one / two simple examples of classifiers, also
introduce the concept of decision boundary
- idea of simple linear classifier: take features, produce real value ("uwes beer score"), use threshold to decide
-> simple linear classifier (linear SVM e.g.)
-> beer example with some weights
- show code example with logistic regression for beer data, show weights, plot decision function
### Coding session:
- change given code to use a linear SVM classifier
- use different data (TBD) set which can not be classified well with a linear classifier
- tell to transform data and run again (TBD: how exactly ?)
## Part 2b: supervised learning: regression (TBD: skip this ?)
Intention: demonstrate one / two simple examples of regression
- regression: how would I rate this movie ?
example: use weighted sum, also example for linear regresor
example: fit a quadratic function
- learn regressor for movie scores.
## Part 3: accuracy, F1, ROC, ...
- pitfalls for unbalanced data sets
e.g. diagnose HIV
- precision / recall
- ROC ?
### Coding session
- evaluate accuracy of linear beer classifier from latest section
- fool them: give them other dataset where classifier fails.
## Part 4: underfitting/overfitting
classifiers / regressors have parameters / degrees of freedom.
- underfitting:
- linear classifier for points on a quadratic function
- overfitting:
- features have actual noise, or not enough information
not enough information: orchid example in 2d. elevate to 3d using another feature.
- polnome of degree 5 to fit points on a line + noise
- points in a circle: draw very exact boundary line
- how to check underfitting / overfitting ?
- cross validation
### Coding session:
- How to do cross validation with scikit-learn
- use different beer feature set with redundant feature (+)
- run crossvalidation on classifier
## Part 6: pipelines / parameter tuning with scikit-learn
- Scicit learn api: recall what we have seen up to now.
- pipelines, preprocessing (scaler, PCA)
- cross validatioon
- parameter tuning: grid search / random search.
### Coding par
Planning: stop here, make time estimates.
# DAY 2
### Part 6:
Intention: quick walk throught throug reliable classifiers, give some background
idea if suitable, let them play withs some incl. modification of parameters.
to consider: decision graph from sklearn, come up with easy to understand
diagram.
- Neighrest neighbours
- SVMs
- demo for RBF: different parameters influence on decision line
- Random forests
- Gradient Tree Boosting
### Part 7: Start with neural networks. .5 day
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
### Coding session
- apply SVM, Random Forests, Gradient boosting to previous examples
- apply clustering to previous examples
- MNIST example
### Coding session
- build SVM and Random forest crossval pipelines for previous examples
- use PCA in pipeline for (+) to improve performance
- find optimal SVM parameters
- find optimal pca components number
## Part 7: Best practices
- visualize features: pairwise scatter, tSNE
- PCA to undertand data
- check balance of data set, what if not ?
- start with baseline classifier / regressor
- augment data to introduce variance
## Part 8: neural networks
- overview, history
- perceptron
- multi layer
- multi layer demoe with google online tool
- where neural networks work well
- keras demo
### Coding Session
- keras reuse network and play with it.