Machine Learning
101
Fred Verheul
What we won’t cover…
• Deep learning / Neural Networks
• Specifics of ML-algorithms
• Tools / Libraries / Code
• SAP Products, like HANA / Predictive Analytics / Vora / …
• Ethics, algorithmic transparency & fairness
• Hardware
2
Examples: Recommender systems
3
Examples, continued…
4
SPAM-
filtering
Handwriting
recognition
ML in the news: Deepmind’s AlphaGo
5
6
Machine Learning
"Field of study that gives computers the ability to learn
without being explicitly programmed” (Arthur Samuel, 1959)
7
What is Machine Learning?
8
Computer
Computer
Traditional Programming
Machine Learning
Data
Data
Program
Output
Program
Output
Sweet spot for Machine Learning
• It’s impossible to write down the rules in code:
• Too many rules
• Too many factors influencing the rules
• Too finely tuned
• We just don’t know the rules (image recognition)
• Lots of labeled data (examples) available (e.g. historical data)
9
Basic Machine Learning ‘workflow’
10
Feature
Vectors
Training
data
Labels
Machine
Learning
Algorithm
Feature
Vectors
New data Prediction
Training Phase
Operational Phase
Predictive
Model
Training Phase in more detail
11
Raw data
Data
preparation Feature
Vectors
Training
Data
Test
data
Model Building
(by ML
algorithm)
Model
Evaluation
Predictive
Model
Feedback loop
data cleansing
data transformation
normalization
feature extraction
aka
‘learning’
CRISP-DM: data mining process
12
ML
important
ML
important
Examples of ML tasks
Supervised learning
Regression 
target is numeric
Classification 
target is categorical
13
Unsupervised learning
Clustering
Dimensionality
reduction
Modeling: so many algorithms…
14
ML Algorithms: by Representation
Collection of candidate models/programs, aka hypothesis space
15
Decision trees
Instance-based
Neural networks
Model ensembles
ML Algorithms: by Evaluation
Evaluation: Quality measure for a model
16
Regression
Example metric: Root Mean Squared Error
RMSE =
Binary classification: confusion matrix
Accuracy: 8 + 971 -> 97,9%
Example: medical test
for a disease
Positive Negative
P
True
positives
TP
False
Negatives
FN
N
False
positives
FP
True
Negatives
TN
True
Class
Predicted class
Accuracy: Better evaluation metrics:
• Precision: 8 / (8 + 19)
• Recall: 8 / (8 + 2)
Optimization: how the algorithm ‘learns’, depends on representation and
evaluation
ML Algorithms: by Optimization
17
Greedy Search,
ex. of
combinatorial
optimization
Gradient Descent (or in general: Convex Optimization)
Linear Programming (or in general:
Constrained/Nonlinear Optimization)
Training error vs test error
18
Data Science for Business
• Focuses more on general principles
than specific algorithms
• Not math-heavy, does contain some
math
• O’Reilly link:
http://shop.oreilly.com/product/063692
0028918.do
• Book website: http://data-science-for-
biz.com/DSB/Home.html
19
Take-aways
• Goal of ML: generalize from training data (not optimization!!)
• Part of ‘Data Mining Process’, not a goal in and of itself
• No magic! Just some clever algorithms…
• Increasingly important non-technical aspects:
• Ethics
• Algorithmic transparency
20
Thank You
www.soapeople.com
info@soapeople.com
@SOAPEOPLE
Fred Verheul
Big Data Consultant
+31 6 3919 2986
fred.verheul@soapeople.com
@fredverheul

Machine learning 101 sit hvr

  • 1.
  • 2.
    What we won’tcover… • Deep learning / Neural Networks • Specifics of ML-algorithms • Tools / Libraries / Code • SAP Products, like HANA / Predictive Analytics / Vora / … • Ethics, algorithmic transparency & fairness • Hardware 2
  • 3.
  • 4.
  • 5.
    ML in thenews: Deepmind’s AlphaGo 5
  • 6.
  • 7.
    Machine Learning "Field ofstudy that gives computers the ability to learn without being explicitly programmed” (Arthur Samuel, 1959) 7
  • 8.
    What is MachineLearning? 8 Computer Computer Traditional Programming Machine Learning Data Data Program Output Program Output
  • 9.
    Sweet spot forMachine Learning • It’s impossible to write down the rules in code: • Too many rules • Too many factors influencing the rules • Too finely tuned • We just don’t know the rules (image recognition) • Lots of labeled data (examples) available (e.g. historical data) 9
  • 10.
    Basic Machine Learning‘workflow’ 10 Feature Vectors Training data Labels Machine Learning Algorithm Feature Vectors New data Prediction Training Phase Operational Phase Predictive Model
  • 11.
    Training Phase inmore detail 11 Raw data Data preparation Feature Vectors Training Data Test data Model Building (by ML algorithm) Model Evaluation Predictive Model Feedback loop data cleansing data transformation normalization feature extraction aka ‘learning’
  • 12.
    CRISP-DM: data miningprocess 12 ML important ML important
  • 13.
    Examples of MLtasks Supervised learning Regression  target is numeric Classification  target is categorical 13 Unsupervised learning Clustering Dimensionality reduction
  • 14.
    Modeling: so manyalgorithms… 14
  • 15.
    ML Algorithms: byRepresentation Collection of candidate models/programs, aka hypothesis space 15 Decision trees Instance-based Neural networks Model ensembles
  • 16.
    ML Algorithms: byEvaluation Evaluation: Quality measure for a model 16 Regression Example metric: Root Mean Squared Error RMSE = Binary classification: confusion matrix Accuracy: 8 + 971 -> 97,9% Example: medical test for a disease Positive Negative P True positives TP False Negatives FN N False positives FP True Negatives TN True Class Predicted class Accuracy: Better evaluation metrics: • Precision: 8 / (8 + 19) • Recall: 8 / (8 + 2)
  • 17.
    Optimization: how thealgorithm ‘learns’, depends on representation and evaluation ML Algorithms: by Optimization 17 Greedy Search, ex. of combinatorial optimization Gradient Descent (or in general: Convex Optimization) Linear Programming (or in general: Constrained/Nonlinear Optimization)
  • 18.
    Training error vstest error 18
  • 19.
    Data Science forBusiness • Focuses more on general principles than specific algorithms • Not math-heavy, does contain some math • O’Reilly link: http://shop.oreilly.com/product/063692 0028918.do • Book website: http://data-science-for- biz.com/DSB/Home.html 19
  • 20.
    Take-aways • Goal ofML: generalize from training data (not optimization!!) • Part of ‘Data Mining Process’, not a goal in and of itself • No magic! Just some clever algorithms… • Increasingly important non-technical aspects: • Ethics • Algorithmic transparency 20
  • 21.
    Thank You www.soapeople.com info@soapeople.com @SOAPEOPLE Fred Verheul BigData Consultant +31 6 3919 2986 fred.verheul@soapeople.com @fredverheul

Editor's Notes

  • #5 Source for images: http://www.havlena.net/en/machine-learning/machine-learning-what-is-it-where-to-learn-about-it/
  • #6 Go (DeepMind’s AlphaGo). How it works: https://www.tastehit.com/blog/google-deepmind-alphago-how-it-works/ Go is very different to Chess (DeepBlue 1996). Chess works with a game tree + sophisticated evaluation function. Go is too complex, and there are no good evaluation functions, because Go positions are harder to evaluate. Enter Monte Carlo Tree Search: simulation. Exploration/exploitation trade-off! No Go-knowledge required!
  • #9 This diagram is attributed to Pedro Domingos who used it in his Coursera Machine Learning course in 2012.
  • #13 Source: https://en.wikipedia.org/wiki/Cross_Industry_Standard_Process_for_Data_Mining
  • #14 Sources: Regression - http://gerardnico.com/wiki/data_mining/linear_regression Classification - ?? Clustering - https://en.wikipedia.org/wiki/Cluster_analysis Dimensionality reduction: http://www.sthda.com/english/wiki/factoextra-r-package-easy-multivariate-data-analyses-and-elegant-visualization
  • #15 Source: http://machinelearningmastery.com/
  • #16 Sources: Decision Tree - https://en.wikipedia.org/wiki/Decision_tree_learning Instance-based - https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm Neural Networks - https://en.wikipedia.org/wiki/Artificial_neural_network Ensembles - https://www.analyticsvidhya.com/blog/2015/09/questions-ensemble-modeling/
  • #18 Sources: Greedy Search - https://en.wikipedia.org/wiki/Greedy_algorithm Gradient Descent - ?? Linear Programming - http://courses.wccnet.edu/~palay/math181/linearprogramming.htm
  • #19 Source: https://onlinecourses.science.psu.edu/stat857/node/160