Slides from Deep Java Dev meetup with quick overview of the machine learning basics, and essential algorithms from linear regression to convolutional networks.
2. Goal
To introduce Java developers to Machine Learning:
- Explain what it is
-- What it can do
- No heavy math
- Examples and Java code to get started
3. Session Topics
● Machine Learning Basics
● Quick overview from Linear Regression to Deep Learning
● How to do it in Java
4. Artificial Intelligence
Machine Learning
Deep Learning
A type of algorithm(s) that allows a machine
to emulate aspects of intelligent human
behavior
A type of AI that allows a machine to learn
from experience/data
A type of ML that uses powerful computing resources
and advanced neural networks to more-accurately solve
non-linear, highly-dimensional problems with large
amounts of data (eg, vis rec)
Artificial Intelligence and Machine Learning
7. Machine Learning tasks
- what you can do with it?
● Classification - assign a predefined label/category to an item, enum output
Example: Classify emails as spam or not spam
● Regression - model the relationship between variables, real valued output
Example: Predict ad clicks depending of the campaign budget
● Clustering (identify and assign input samples to groups)
Example: What are the typical behaviours of users on my website?
8. Data Prep Train Model Test Model
Deploy Model
(Prediction)
Basic ML Workflow
Analyze Accuracy / Errors
10. Introductory Algorithms
● Linear Regression (regression)
● Logistic Regression (classification)
● Neural Networks & Deep Learning
(classification & regression)
All use the same general
Supervised learning algorithm
The evolution of deep learning
11. General Supervised Learning
while(error > errorThreshold) {
predictedOut = model.getOutput()
error = predictedOut - targetOutput
moveCloserToErrorMinimum()
Iterative error minimization
algorithm (aka optimization)
Based on: Gradient Descent
ModelInput Predicted output
Error = Predicted - Target
Tune model to
minimize error
12. Linear Regression
● What it does: Finds the best possible straight line that through
given set of data points. A rough estimate of direction and
degree of linear dependency.
● Model is simple line: y = slope * x + intercept
● How it works: finds the set of parameters (slope and intercept)
that gives minimum of the error function. Error is calculated as
difference between target and predicted value:
error = target - predicted
● Key concepts:
Error/Loss Function (MSE)
Optimization method (gradient descent - an iterative
procedure for error function minimization) .
https://en.wikipedia.org/wiki/Linear_regression
https://www.quora.com/Does-Gradient-Descent-Algo-always-
converge-to-the-global-minimum
13. Logistic Regression/Binary Classification
● Just put Linear Regression inside Logistic function
● Fits logistic function: y=1/(1+e^-x)) to given data
● Used for binary (yes/no) classification problems
https://en.wikipedia.org/wiki/Logistic_regression
14. Neural networks
● Feed Forward Neural Network - a
directed graph in which each unit
performs logistic regression.
● Learns using Back Propagation
algorithm which is also an error
function minimization.
● Can be used for both
Classification and Regression
problems
● Number of nodes and
layers
● Activation Function
(Logistic, Tanh, ReLU)
● Error Function
(Mean Squared Error,
Cross Entropy)
15. Convolutional Network / Deep Learning
● Extension of Feed Forward Neural
Network specialized for image
classification/recognition taska
● Introduces convolutional layers (2D
and 3D) which act as a learnable
image filters - feature extractors
● Reduces amount or image
preprocessing - preprocessing is
being learned
https://developer.nvidia.com/discover/convolutional-neural-network
16. Experts in Modern Development
• Cloud
• Microservices and Containers
• Java, JavaScript/Node.js, PHP, Python
• DevOps
developer.oracle.com/ambassador @groundbreakers
• Continuous Delivery
• Open Source Technologies
• SQL/NoSQL Databases
• Machine Learning, AI, Chatbots
17. Oracle Data Science Cloud
● Support for all open source ML libraries
● Support for Team Collaboration
● Workflow support for entire lifecycle from data
analysis and model building to monitoring
https://cloud.oracle.com/en_US/ai-platform https://www.datascience.com/
COMING SOON
Visit them at the booth!
18. Thank you!
Questions?
Continue Learning at
http://www.deepnetts.com/machine-learning-basics-for-java-developers.html
http://www.deepnetts.com/quick-intro-to-deep-learning-for-java-developers.html
Ask On Twitter
@zsevarac @deepnetts
Acknowledgments
Based on a series of machine learning sessions and discussions with Frank Greco