SlideShare a Scribd company logo
Machine learning from a
software engineer’s perspective
Marijn van Zelst
AMSTERDAM 16 - 17 MAY 2017
About me
@marijnvanzelst
Marijn van Zelst
• Software engineer at Luminis Amsterdam
Goal:
• Practical knowledge about machine learning
• What kind of problems it can solve
• Do your own experiment
Why is machine learning
interesting for Software Developers?
• New opportunities
• Builds on existing knowledge
• Open-source communities and libraries
Tensorflow
• Developed by Google
• Open-source
• Has api’s for most major programming languages
• High level api
Machine learning
Learn from examples
Handwritten digit classification
MNIST dataset
What is the difference between a
2 and a 3?
Neural networks
Image recognition
Speech recognition
Natural language recognition
Churn prediction
Fraud detection
Anomaly detection
Neural networks
Pixel 1
Pixel 2
Pixel 3
Pixel 784
Zero
Two
One
Nine
Neurons
x3
x1
x2
w1
w2
w3 b
((x1 * w1) + (x2 * w2) + (x3 * w3)) * b
Activation function
x3
x1
x2
w1
w2
w3
((x1 * w1) + (x2 * w2) + (x3 * w3)) * b
b
Input
Output (activation)
Learning algorithm
• While not done
• pick a training example (input data, class)
• run it through the neural network which produces a prediction
• modify the weights in the neural network so that the prediction is closer to the actual class
Agile approach to machine learning
• Theory takes a lot of time to explain and learn
• Using high level api’s you can do experiments without knowing all the mathematical details
• When you have your first results and want to improve
• Learn more
• Ask for expert help
Using a high level api
• Which features do I use?
• Do I need more data?
• How many neurons and layers?
• How many training cycles?
Distinguish 0s and 1s
Just two features
blackwhite
Two dimensional feature space
white black
black 0
1
y
x
y
x
y
x
white black
black 0
1
y
x
Machine learning from a software engineer's perspective - Marijn van Zelst - Codemotion Amsterdam 2017
white black
black
y
x
x
y
w1
w2 b
w1=0.7
w2=0.62
b=0.085
w1
w2 b
w1=0.7
w2=0.62
b=2
w1=0.7
w2=0.62
b=-1
w1=0.5
w2=0.2
b=0.085
w1=0.2
w2=0.5
b=0.085
Neural nets intuition
• Input:
• Features (coordinates in feature space)
• Output:
• A predicted class at every coordinate

in the feature space
white black
black
y
x
More training examples
x
y
x
y
x
y
x
y
Two dimensional feature space
white black
black 0
1
y
x
y
x
y
x
0 & 1
Neural nets intuition
• The combination of several features make classes distinguishable
• Training on more examples doesn’t always work
• Neural networks can handle thousands of features
white black
black 0
1
y
x
0 & 1
white black
black
y
x
x
yx y
x
y
x
y
y
x
y
x
Neural nets intuition
Adding a feature can make other features more useful
Machine learning from a software engineer's perspective - Marijn van Zelst - Codemotion Amsterdam 2017
50 steps 600 steps5 steps
train - 72.5% train - 88.8% train - 92.2%
Machine learning from a software engineer's perspective - Marijn van Zelst - Codemotion Amsterdam 2017
50 steps 600 steps5 steps
train - 72.5% train - 88.8% train - 92.2%
test - 76.5% test - 82.6% test - 80.3%
Machine learning from a software engineer's perspective - Marijn van Zelst - Codemotion Amsterdam 2017
Neural nets intuition
• Keep a test set to verify the accuracy of your training algorithm
• Keep an eye on the test set accuracy during training to decide when to stop
78% 88% 71%
78%88%
71%
Neural nets intuition
• How many neurons?
• Depends on the complexity of the data
• Start small, gradually ramp up
• Check for overfitting
Insights
• High dimensional
• Can handle and find correlations between lots of features
• They do probabilistic predictions
• They require a training set and a test set for validation
from tensorflow.contrib.learn import infer_real_valued_columns_from_input, DNNClassifier
from tensorflow.examples.tutorials import mnist
mnist_data = mnist.input_data.read_data_sets("MNIST_data/")
train_data, test_data = mnist_data.train.images, mnist_data.test.images
train_labels, test_labels = mnist_data.train.labels.astype('int32'),
mnist_data.test.labels.astype('int32')
estimator = DNNClassifier(
feature_columns=infer_real_valued_columns_from_input(mnist_data.train.images),
hidden_units = [2500, 1000, 1500, 2000, 500],
n_classes = 10)
estimator.fit(x = train_data, y = train_labels, steps = 1000)
print(estimator.evaluate(x = test_data, y = test_labels)['accuracy'])
# 97.5% accuracy in ~15min
Handwritten digit classifier in TensorFlow
Conclusion
• You can use machine learning using a high level api
• It can make complex decisions on lots of features
• Using high level api’s you can do experiments without knowing all the mathematical details
• When you have your first results and want to improve
• Learn more
• Ask for expert help
Resources on machine learning
• Tensorflow high level api quickstart: https://www.tensorflow.org/get_started/tflearn
• Other resources:
• My blog on the text classification with some more in depth code: https://github.com/luminis-ams/
blog-text-classification
• For a theoretical understanding of the backpropagation algorithm: Machine learning course
Coursera - Andrew Ng
• More practical deep learning course: Udacity deep learning course
• Visualization of a neural network (used in the presentation)
• http://playground.tensorflow.org
Dijkstra probably hates me - Linus
Torvalds, in kernel/sched.c
?Thank you
Any
Questions?

More Related Content

PDF
My First Attempt on Kaggle - Higgs Machine Learning Challenge: 755st and Proud!
PPT
Matlab introduction
PDF
Machine Learning in Python - PyLadies Stockholm
PDF
Matlab Graphics Tutorial
PPTX
2D Plot Matlab
PDF
Numerical tour in the Python eco-system: Python, NumPy, scikit-learn
PDF
Creating a MOOC at University of Osnabrück
PPT
Octave - Prototyping Machine Learning Algorithms
My First Attempt on Kaggle - Higgs Machine Learning Challenge: 755st and Proud!
Matlab introduction
Machine Learning in Python - PyLadies Stockholm
Matlab Graphics Tutorial
2D Plot Matlab
Numerical tour in the Python eco-system: Python, NumPy, scikit-learn
Creating a MOOC at University of Osnabrück
Octave - Prototyping Machine Learning Algorithms

What's hot (20)

PPTX
Tensor flow (1)
PDF
Deep learning
PDF
Introducton to Convolutional Nerural Network with TensorFlow
PDF
Rajat Monga at AI Frontiers: Deep Learning with TensorFlow
PPTX
Introduction to ml and dl
PPTX
Lines and planes in space
PPTX
Whiteboarding Coding Challenges in Python
PPTX
Mat lab workshop
PDF
Machine Intelligence at Google Scale: TensorFlow
PPTX
Clustering: A Scikit Learn Tutorial
PPTX
Introduction to Machine Learning with TensorFlow
PPTX
Introduction to Tensorflow
PDF
Machine learning with scikit-learn
PDF
Machine Learning Basics for Web Application Developers
PDF
Power ai tensorflowworkloadtutorial-20171117
PPTX
Introduction to object detection
PDF
Tensor board
PPTX
Machine Learning - Introduction to Tensorflow
PPTX
Tensor flow
PPTX
Practical deep learning for computer vision
Tensor flow (1)
Deep learning
Introducton to Convolutional Nerural Network with TensorFlow
Rajat Monga at AI Frontiers: Deep Learning with TensorFlow
Introduction to ml and dl
Lines and planes in space
Whiteboarding Coding Challenges in Python
Mat lab workshop
Machine Intelligence at Google Scale: TensorFlow
Clustering: A Scikit Learn Tutorial
Introduction to Machine Learning with TensorFlow
Introduction to Tensorflow
Machine learning with scikit-learn
Machine Learning Basics for Web Application Developers
Power ai tensorflowworkloadtutorial-20171117
Introduction to object detection
Tensor board
Machine Learning - Introduction to Tensorflow
Tensor flow
Practical deep learning for computer vision
Ad

Viewers also liked (12)

PDF
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native
PDF
Webinar: Queues with RabbitMQ - Lorna Mitchell
PDF
Microservices Without Servers - James Thomas - Codemotion Amsterdam 2017
PDF
Capturing the human body motion with inertial sensors, the Open Source way - ...
PDF
Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...
PPTX
How to build an HA container orchestrator infrastructure for production – Giu...
PDF
Webinar: Mario Cartia - Facciamo il Punto su Presente e Futuro dei framework ...
PDF
Functional programming is not just lambdas! - David Sferruzza - Codemotion Am...
PDF
Downtime is not an option - day 2 operations - Jörg Schad
PDF
Composable architectures The Lego of IT - Alessandro David
PDF
Webinar: Giovanni Laquidara - Creare applicazioni VR
PDF
Webinar - Big Data: Let's SMACK - Jorg Schad
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native
Webinar: Queues with RabbitMQ - Lorna Mitchell
Microservices Without Servers - James Thomas - Codemotion Amsterdam 2017
Capturing the human body motion with inertial sensors, the Open Source way - ...
Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...
How to build an HA container orchestrator infrastructure for production – Giu...
Webinar: Mario Cartia - Facciamo il Punto su Presente e Futuro dei framework ...
Functional programming is not just lambdas! - David Sferruzza - Codemotion Am...
Downtime is not an option - day 2 operations - Jörg Schad
Composable architectures The Lego of IT - Alessandro David
Webinar: Giovanni Laquidara - Creare applicazioni VR
Webinar - Big Data: Let's SMACK - Jorg Schad
Ad

Similar to Machine learning from a software engineer's perspective - Marijn van Zelst - Codemotion Amsterdam 2017 (20)

PDF
Getting Started with Machine Learning
PDF
ML in Android
PDF
An introduction to Machine Learning
PDF
A Gentle Intro to Deep Learning
PDF
Hands_On_Machine_Learning_with_Scikit_Le.pdf
PDF
OpenPOWER Workshop in Silicon Valley
PDF
maXbox starter65 machinelearning3
PPTX
Practical ML
PDF
Introduction Machine Learning by MyLittleAdventure
PPTX
Google Developer Groups Talk - TensorFlow
PPTX
Deep learning with TensorFlow
PPTX
08 neural networks
PDF
Keith Moon "Machine learning for iOS developers"
PPTX
TechEvent Machine Learning
PPTX
Machine Learning for iOS developers
PPTX
How to Build a Neural Network and Make Predictions
PPTX
.NET Fest 2017. Игорь Кочетов. Классификация результатов тестирования произво...
PPTX
B4UConference_machine learning_deeplearning
PPTX
Introduction to Neural Networks and Deep Learning
PPTX
Artificial Intelligence, Machine Learning and Deep Learning
Getting Started with Machine Learning
ML in Android
An introduction to Machine Learning
A Gentle Intro to Deep Learning
Hands_On_Machine_Learning_with_Scikit_Le.pdf
OpenPOWER Workshop in Silicon Valley
maXbox starter65 machinelearning3
Practical ML
Introduction Machine Learning by MyLittleAdventure
Google Developer Groups Talk - TensorFlow
Deep learning with TensorFlow
08 neural networks
Keith Moon "Machine learning for iOS developers"
TechEvent Machine Learning
Machine Learning for iOS developers
How to Build a Neural Network and Make Predictions
.NET Fest 2017. Игорь Кочетов. Классификация результатов тестирования произво...
B4UConference_machine learning_deeplearning
Introduction to Neural Networks and Deep Learning
Artificial Intelligence, Machine Learning and Deep Learning

More from Codemotion (20)

PDF
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
PDF
Pompili - From hero to_zero: The FatalNoise neverending story
PPTX
Pastore - Commodore 65 - La storia
PPTX
Pennisi - Essere Richard Altwasser
PPTX
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
PPTX
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
PPTX
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
PPTX
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
PDF
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
PDF
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
PDF
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
PDF
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
PDF
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
PDF
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
PPTX
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
PPTX
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
PDF
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
PDF
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
PDF
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
PDF
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Pompili - From hero to_zero: The FatalNoise neverending story
Pastore - Commodore 65 - La storia
Pennisi - Essere Richard Altwasser
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019

Recently uploaded (20)

PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPT
Teaching material agriculture food technology
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
MIND Revenue Release Quarter 2 2025 Press Release
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Empathic Computing: Creating Shared Understanding
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
sap open course for s4hana steps from ECC to s4
PDF
KodekX | Application Modernization Development
PDF
cuic standard and advanced reporting.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Teaching material agriculture food technology
Per capita expenditure prediction using model stacking based on satellite ima...
Reach Out and Touch Someone: Haptics and Empathic Computing
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
The Rise and Fall of 3GPP – Time for a Sabbatical?
MIND Revenue Release Quarter 2 2025 Press Release
The AUB Centre for AI in Media Proposal.docx
NewMind AI Weekly Chronicles - August'25 Week I
Empathic Computing: Creating Shared Understanding
Chapter 3 Spatial Domain Image Processing.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Spectral efficient network and resource selection model in 5G networks
Unlocking AI with Model Context Protocol (MCP)
sap open course for s4hana steps from ECC to s4
KodekX | Application Modernization Development
cuic standard and advanced reporting.pdf
Digital-Transformation-Roadmap-for-Companies.pptx

Machine learning from a software engineer's perspective - Marijn van Zelst - Codemotion Amsterdam 2017