Machine and Deep Learning with MATLAB Alexander Diethert, Application Engineering May, 24 th 2018, London 2018 The MathWorks, Inc. 1
2
Agenda Artificial Intelligence enabled by Machine and Deep Learning Machine Learning Deep Learning Outlook: Integration in Production Systems 3
Source: Gartner, Real Truth of Artificial Intelligence by Whit Andrews Presented at Gartner Data & Analytics Summit 2018, March 2018 4
Big Data Compute Power Machine Learning Analytics are pervasive Why Now? We have data Engineering Business Transactional We have compute Desktop Multicore, GPU Clusters Cloud computing Hadoop with Spark We know how Neural Networks Classification Clustering Regression and much more 5
6
7
There are two ways to get a computer to do what you want Traditional Programming Data COMPUTER Output Program
There are two ways to get a computer to do what you want Machine Learning Data COMPUTER Program Output
There are two ways to get a computer to do what you want Machine Learning Data COMPUTER Model Output Artificial Intelligence Machine Learning
AI, Machine Learning, and Deep Learning Artificial Intelligence Any technique that enables machines to mimic human intelligence Machine Learning Statistical methods enable machines to learn tasks from data without explicitly programming Deep Learning Neural networks with many layers that learn representations and tasks directly from data 1950s 1980s 2015 Deep Learning more accurate than humans on image classification FLOPS Thousand Million Quadrillion 11
What can Machine and Deep Learning do? http://www.cs.ubc.ca/~nando/340-2012/lectures/l1.pdf 12
Example: Predictive Analytics in e-commerce Engineering Data Images Social profile Use Image Processing to add image data to the model, improving performance Geolocation Keystroke logs IMPROVED Predictive Model Improved Offer to Customer Business Data Transactions 13
Applications of Machine Learning and Deep Learning in Finance Algorithmic Trading Sentiment Analysis Fraud Detection Forecasting / Prediction Credit Decision Making Financial Planning 14
Agenda Artificial Intelligence enabled by Machine and Deep Learning Machine Learning Deep Learning Outlook: Integration in Production Systems 15
Customer References 16
Example: Machine Learning for Risk Managers Machine learning is enabling better models for complex problems https://www.mckinsey.com/~/media/mckinsey/dotcom/client_service/risk/pdfs/the_future_of_bank_risk_management.ashx 17
Machine Learning Workflow 1 Access and Explore Data 2 Preprocess Data 3 Develop Predictive Models 4 Integrate with Production Systems 5 Visualize Results Files Working with Messy Data Model Creation e.g. Machine Learning Desktop Apps 3 rd party dashboards Databases Data Reduction/ Transformation Parameter Optimization Enterprise Scale Systems AWS Kinesis Web apps Sensors Feature Extraction Model Validation Embedded Devices and Hardware 18
Types of Machine Learning Type of Learning Categories of Algorithms Unsupervised Learning Group & interpret data based only on input data Clustering Output is the # of groups formed from similar data. Find natural groups and patterns from input data only Machine Learning Classification Output is a choice between classes (True, False) (Red, Blue, Green) Supervised Learning Develop predictive model based on both input and output data Regression Output is a prediction of the future state 19
Workflows of Machine Learning Iterate: apply model, evaluate Unsupervised Learning LOAD DATA PREPROCESS DATA FILTERS UNSUPERVISED LEARNING CLUSTERING CLUSTERS Machine Learning TRAINING DATA PREPROCESS DATA SUPERVISED LEARNING MODEL APP Supervised Learning TEST DATA FILTERS PREPROCESS DATA CLASSIFICATION REGRESSION MODEL PREDICTION REPORT MODEL. FILTERS Class, State, 1. ACCESS 2. EXPLORE AND DISCOVER 3. SHARE 20
Demo: Classification Learner App 21
Machine Learning Apps for Classification and Regression Point and click interface no coding required Quickly evaluate, compare and select regression models Export and share MATLAB code or trained models 22
Fine-tuning Model Parameters Why? o Manual parameter selection is tedious and may result in suboptimal performance When? o When training a model with one or more parameters that influence the fit Hyperparameter Tuning with Bayesian Optimization Previously tuning these parameters was a manual process Capabilities o Efficient comparted to standard optimization techniques or grid search o Tightly integrated with fit function API with pre-defined optimization problem (e.g. bounds) 23
Building out your Machine Learning Tool Access and Explore Data Process Data and Create Feature Build and Validate Models Deploy Model Review Model 24
Agenda Artificial Intelligence enabled by Machine and Deep Learning Machine Learning Deep Learning Outlook: Integration in Production Systems 25
Machine learning vs deep learning Deep learning performs end-to-end learning by learning features, representations and tasks directly from images, text and sound Machine Learning Deep learning algorithms also scale with data traditional machine learning saturates Deep Learning 26
What is Deep Learning? 27
Data Types for Deep Learning Signal Text Image 28
Deep learning and neural networks Deep learning == neural networks; Data flows through network in layers Layers provide transformation of data Input Layer Hidden Layers (n) Output Layer 29
Thinking about Layers Layers are like blocks Stack on top of each other Replace one block with a different one Each hidden layer processes the information from the previous layer 30
Thinking about Layers Layers are like blocks Stack them on top of each other Replace one block with a different one Each hidden layer processes the information from the previous layer Layers can be ordered in different ways 31
Convolutional neural networks Train deep neural networks on structured data (e.g. images, signals, text) Implements Feature Learning: Eliminates need for hand crafted features Training using GPUs for performance car truck van bicycle Input Convolution + ReLu Pooling Convolution + ReLu Pooling Flatten Fully Connected Softmax Feature Learning Classification 32
Input data Output data Convolutional Neural Networks (CNN) CNN take a fixed size input and generate fixed-size outputs. Convolution puts the input images through a set of convolutional filters, each of which activates certain features from the input data. 33
Another Network for Signals - LSTM LSTM = Long Short Term Memory (Networks) Signal, text, time-series data Use previous data to predict new information I live in France. I speak. c 0 C 1 C t 34
Long Short-Term Memory (LSTM) LSTM are an extension of Recurrent Neural Networks. RNN can handle arbitrary input/output lengths. They have the capability to use the dependencies among inputs. LSTMs just like every other RNN connect through time. They are capable of preserving the long-term and short-term dependencies that occur within data. 35
Example: Algorithmic Trading 36
Another Application: Sentiment Analysis with Twitter Data Access Tweets Preprocess Tweets Develop Model Predict Sentiment Clean-up Text Convert to Numeric Apple's iphone 8 to Drive 9.1% Increase in Shipments Per IDC https://t.co/n085f65up k $AAPL $GRMN $GOOG appl e ipho ne incr ease sell tweet1 1 1 1 0 tweet2 1 0 0 1 Buy Increase apples iphone drive increase shipments per idc Fraud 37
Deep Learning on CPU, GPU, Multi-GPU and Clusters H OW TO TA RG E T? Single CPU Single CPU Single GPU Single CPU, Multiple GPUs On-prem server with GPUs Cloud GPUs (AWS) 38
GPU Coder Automatically generates CUDA Code from MATLAB Code can be used on NVIDIA GPUs CUDA extends C/C++ code with constructs for parallel computing 39
Agenda Artificial Intelligence enabled by Machine and Deep Learning Machine Learning Deep Learning Outlook: Integration in Production Systems 40
Integrate with Production Systems Data Analytics Business System Databases Cosmos DB MATLAB Production Server Dashboards Cloud Storage Azure Blob Web Streaming AWS Kinesis Request Broker Custom Apps PI System Azure IoT Hub Platform 41
Thank you for your attention 42