Machine Learning for Java Developers in 45 Minutes Why, How and Whoa! Session CON2977 WEDNESDAY Oct 4, 2017 8:30am - 9:15am PT
Speakers Zoran Severac @neuroph 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 Not Just Big Data 2.0 Big Data is about Traditional Data Analytics and Visualization Tools >50% Big Data Projects fail - focus is on data gathering/prep/architecture, not on analysis ML is more Dynamic than just Data Analytics Machines can find Patterns and create ML models much faster than Humans
What Problem does ML Solve? Chess has simple rules. 64 Squares 16 Attackers/Defenders per side Well-defined moves Rules are easy to describe. Straightforward to program. Chess Chihuahua or Muffin? Visual Recognition (an ML example) Requires deeper thought Potentially subjective Rules are very hard to describe. Much harder to program. Early AI/ML systems failed partially due to hard-coded rules.
Many Applications are Hard to Code Many applications are not explicitly programmable Machines can automate the correlations and model building... 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 Output Input Same Input gives us the Same Output Same Input gives us the Same Output Same Input gives us the Same Output
But We re Not Used to Non-Deterministic Solutions Input Input Input Input Input Input Input Imput Input Input Input Inputt Lots of Noisy Datasets Sensors, voice, images, video Many variables with noisy data ModelA ModelB Output1 Output2 ModelC ModelD Output3 Probabilistic Outputs Uncertainty, noisy data, randomness, statistical, different contexts, etc.
Problem Definition Determine Target Metrics Basic WorkFlow of ML-Infused App Data Scientists Data Prep Parse/Filter the Data Data Engineers Train Model Observe Patterns / Learn Test Model Deploy Predict
Recommendations ML is already heavily used Fraud detection Targeted ads Customer support patterns Smart oil rig Hacker detection
Use Cases for Visual Recognition alone Ensure positioning of assembly products Track logos on social media Travel and retail suggestions Visual compliance or deterioration
Google's CEO, Sundar Pichai - his company is betting big on advances in artificial intelligence (AI) and machine learning in the coming years. https://goo.gl/f36ine Tim Cook from Apple - "Today, machine learning drives improvement in countless features across our products. https://goo.gl/zetmiv CEO Satya Nadella at Microsoft s Ignite conference talked about his vision for how deep learning and AI will transform the company. https://goo.gl/xuip4h
But Didn t We Try This Already? Yes But AI had overly broad scope Intelligent agents, first-order logic, knowledge ontologies, probabilistic reasoning, learning theory, NLP, robotics, 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. A boil the ocean approach Computing resources weren t yet capable Now they are...
Machine Learning A type of AI that allows a machine to learn from experience/data 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 Chess 1997 Go 2016
Software vs. Humans 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 But what if we don t assume a type of dependency?
Evolution of Neural Networks Adaline - Linear Regression Perceptron - Logistic Regression Multi Layer Perceptron and Backpropagation - Complex Unknown Function Convolutional Neural Networks and Deep Learning
Neural network / Deep Learning Multi Layer Perceptron - 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 layers/neurons Activation Function (Sigmoid, Tanh, ReLU) Error Function (MSE, CE)
Questions and Comments? Pending JSR #381 - VisRec https://jcp.org/en/jsr/detail?id=381 Github Repo - https://github.com/sevarac/visualrecognitionapi Wiki - https://github.com/sevarac/visualrecognitionapi/wiki Mailing list - https://groups.io/g/visrec/
http://www.tcs.com/sitecollectiondocuments/white%20papers/machine-learning-analytics-in-manufacturing-0714-1.pdf