Documente Academic
Documente Profesional
Documente Cultură
AI Researcher
Univ of Belgrade, Serbia
JC, NetBeans Dream Team
Frank Greco
@frankgreco
Chair
NYJavaSIG - NY Java User Group
JC, Cloud/Mobile Architect
Goal
To explain what Machine Learning is, why it’s important and
show Java Developers how to create your own ML apps
What is Machine Learning (ML)
● A Type (Subclass) of Artificial Intelligence (AI)
● A System that Learns and Improves its Predictions
○ For Example: Gmail - “flag this as spam” or “not spam”
Face recognition
Handwriting
translation
Autonomous
Driving
http://vision.ics.uci.edu/images/fun/IMG_1183_augmented_reality_faces1.jpg
We are Familiar with Deterministic Solutions
Input Output
Input
Input
Input ModelA ModelB
Input Output1
Input
Input Output2
Input
Imput
ModelC ModelD Output3
Input
Input Probabilistic Outputs
Input
Inputt Uncertainty, noisy data,
randomness, statistical,
Lots of Noisy Datasets
different contexts, etc.
Sensors, voice, images, video
Many variables with noisy data
Problem Definition
Basic WorkFlow
Determine of
Target Metrics ML-Infused App
Data Engineers
Train Model Observe Patterns / Learn
Test Model
Deploy Predict
ML is already
Recommendations heavily used
Fraud detection
Targeted ads
Quiz
When was the first “AI” conference?
1972? 1985? 1955? 1999? 2001?
Punch cards weren’t even invented in 1955!
What Happened?
Cool research but funding was erratic due to lofty goals and missed
milestones.
Deep Learning
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
A type of algorithm(s) that allows a machine to
emulate aspects of intelligent human behavior
Software vs. Humans
Jeopardy
2011
https://research.fb.com/wp-content/uploads/2016/11/deepface-closing-the-gap-to-human-level-performance-in-face-verification.pdf?
Software vs. Humans – It doesn’t stop there
http://www.eetimes.com/author.asp?section_id=36&doc_id=1331264&
New Approaches to Hardware
Addresses Dark Silicon
At least 15x-30x faster
than GPU/CPUs for ML
applications
https://drive.google.com/file/d/0Bx4hafXDDq2EMzRNcy1vSUxtcEk/view
Why Project Panama (Java API for Native Libs) is Extremely Important!
Who Are the Big Players with Engines/Services?
Popular Java Toolkits (small subset)
Oryx 2
VisRec JSR #381¹
How Should a
Java Developer Get Started?
Basic Terminology
● Machine learning gives "computers the ability to learn without being explicitly
programmed.” https://en.wikipedia.org/wiki/Machine_learning
● Data set - set of data that represent specific problem we’re trying to solve
● Model - A data structure that consists of various parameters and methods that
transform inputs into outputs. Includes some kind of training procedure.
● Training, learning procedure, adjusts model parameters based on the data set
in order to solve/learn specific problem (learn data set)
● Performance measure - metric that is used to tell how good model has
learned the data.
Types of Machine Learning
● Supervised
● Unsupervised
● Reinforcement
Supervised Learning
● Learns from examples that provide inputs and target/desired outputs
● It can learn input-output mapping
● Learning is based on iteratively feeding inputs into model,
and minimising the error between the actual and target output (cost function)
Linear Regression
● Find the line that best fits the relationship between the input
variables (x) and the output variables (y)
● Assumes linear dependency between variables (a simple
straight line) y = slope * x+ intercept
● Example: Estimate number of bugs depending on
development time, number of developers, number of
meetings, number of managers in the team, deadline etc.
● For better results remove correlated data and noise
● Used for regression problems
● What if dependency is not linear?
Image from https://en.wikipedia.org/wiki/Linear_regression
Logistic Regression/Binary Classification
● Same as Linear Regression, just fits a data to the
logistic function: y=1/(1+e^-x))
● Used for binary classification problems
(spam/not spam)
https://en.wikipedia.org/wiki/Logistic_regression