More Related Content Similar to LAD -GroundBreakers-Jul 2019 - The Machine Learning behind the Autonomous Database (20) More from Sandesh Rao (20) LAD -GroundBreakers-Jul 2019 - The Machine Learning behind the Autonomous Database1. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Introduction to Machine
Learning – From DBA’s to Data
Scientists
LAD – Oracle Groundbreakers
Sandesh Rao
VP AIOps , Autonomous Database
@sandeshr
https://www.linkedin.com/in/raosandesh/
https://www.slideshare.net/SandeshRao4
1
2. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, timing, and pricing of any
features or functionality described for Oracle’s products may change and remains at the
sole discretion of Oracle Corporation.
2
3. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
whoami
Real
Application
Clusters - HA
DataGuard-
DR
Machine
Learning-
AIOps
Enterprise
Management
Sharding
Big Data
Operational
Management
Home
Automation
Geek
@sandeshr
https://www.linkedin.com/in/raosandesh/
3
4. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Agenda
• Introduction to Machine Learning
• Which algorithms, tools & technologies are
used?
• Use cases for where to use machine
learning
• Questions and Open Talk
4
5. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Why Machine Learning for us and why now?
• Lots of Data generated as exhaust from systems
– Cloud , different formats and interfaces , frameworks
• Machine Learning has become accessible
– Anyone can be a Data Scientist
– Algorithms are accessible as libraries aka scikit , keras ,
tensorflow , Oracle ML , Oracle Data Mining , OML4Py ..
– Sandbox to get started as easy as a docker init
• Business use cases
• How to find value from the data , fewer guesses to make decisions
5
6. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
ML Project Workflow
• Set Business Objectives
• Gather , Prepare and Cleanse Data
• Model Data
– Feature Extraction , Test , Train ,
Optimizer
– Loss Function , effectiveness
– Framework and Library to use
• Apply the Model as an inference
engine
– Decision making using the Model’s
output
– Tune Model till outcome is closer to
Business Objective
Set Business
Objectives
Understand Use
case
Create Pseudo
Code
Synthetic Data
Generation
Pick Tools and
Frameworks
Train Test Model
Deploy Model
Measure Results
and Feedback
6
7. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Types of Machine Learning
Supervised Learning
Predict future outcomes with the help of
training data provided by human experts
Semi-Supervised Learning
Discover patterns within raw data and make
predictions, which are then reviewed by human
experts, who provide feedback which is used to
improve the model accuracy
Unsupervised Learning
Find patterns without any external input other
than the raw data
Reinforcement Learning
Take decisions based on past rewards for this
type of action
7
8. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
• Hierarchical k-means, Orthogonal
Partitioning Clustering, Expectation-
Maximization
Clustering
Feature Extraction/Attribute
Importance / Component Analysis
• Decision Tree, Naive Bayes, Random
Forest, Logistic Regression, Support
Vector Machine
Classification
Machine Learning Algorithms
• Multiple Regression, Support Vector
Machine, Linear Model, LASSO, Random
Forest, Ridge Regression, Generalized
Linear Model, Stepwise Linear Regression
Regression
Association & Collaborative Filtering
Reinforcement Learning - brute force,
Monte Carlo, temporal difference....
• Many different use cases
Neural network & deep Learning with
Deep Neural Network
8
9. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
What are Neural Networks?
• Algorithms that are loosely modeled on the
way brains work
• They learn how to recognize patterns
• Neural network building blocks
– Neurons
– Inputs
– Outputs (called activation functions)
– Weights
– Biases
10. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
How Neural Networks Work
• Neurons are the decision makers
• Each neuron has one or more inputs and a single output called an activation function
– This output can be used as an input to one or more neurons or as an output for the network as a
whole
• Some inputs are more important than others and so are weighted accordingly
• Neurons themselves will "fire" or change their outputs based on these weighted inputs
• How quickly they fire depends on their bias
11. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Input layer
(784 neurons)
Hidden layer
(15 neurons)
Output layer
Examples of How Neural Networks Work
• Here you can see a simple diagram with inputs on the
left
• Only eight are shown but there would need to be 784
in total, one neuron mapping to each of the 784
pixels in the 28x28 pixel scanned images of
handwritten digits that the network processes
• On the right-hand side, you see the outputs
• We would want one and only one of those neurons to
fire each time a new image is processed
• In the middle, we have a hidden layer, so-called
because you don't see it directly
12. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Examples of How Neural Networks Work Neural Networks
• The input layer has neurons that map to an individual
pixel
• The output neurons effectively map to the whole image
• Those hidden layers map to components of the image
– They recognize a curve or a diagonal line or a closed loop
– Importantly, those components in the hidden layers map to
specific locations in the original image
– They are hard links from the individual pixels on the left
• So a network like the previous one would not be able to
answer a simple question on the image like the one
here: how many horses do you see?
13. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Examples of How Neural Networks Work
• Starting with this basic structure, it's possible to build a neural network that can identify
items in a position-independent way
• Neurons in the visual cortex of animals, including humans, work in a similar way.
• There are neurons that only trigger on certain parts of the field of view.
28 x 28 input neurons 3 x 24 x 24 neurons
3 x 12 x 12 neurons
Convolutional Layers
Pooling Layers
14. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Natural Language Processing
• Convolutional networks are not good at natural language processing
• Language is highly contextual
• Individual words have to be processed in the context of the words around
them
Image processing
Natural language
processing!=
15. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Recurrent Neural Networks
• A feedback loop is required to take into account words earlier in the
sentence
• Networks with feedback loops are called recurrent neural networks
• In the simplest form a feedback loop looks like this:
16. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Modeling Phase – AutoML to the rescue
Provide Dataset to
AutoML
Configuration parameters
for model picked
Dataset is divided into
training set & testing set
Actual Training
Evaluate performance of
trained model
Tweak model parameters,
change predictors change
test/train data splits and
change algorithms
Pick model plus
parameters depending on
outcome and measure , F1
, Precision , Recall , MSE
Document all runs and
apply A/B testing to see
what the variations
produce
16
17. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Tools & Libraries Assisting ML projects
17
18. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Oracle AI Platform Cloud Service – Coming Soon…
• Collaborative end-to-end machine learning in the cloud
• Enables data science teams to
– Organize their work
– Access data and computing resources
– Build , Train , Deploy
– Manage models
• Collaborative , Self-Service , Integrated
• https://cloud.oracle.com/en_US/ai-platform
18
19. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Oracle Autonomous Data Warehouse Cloud Key Features
Highly Elastic
Independently scale compute and
storage, without having to overpay for
fixed blocks of resources
Built-in Web-Based SQL ML Tool
Apache Zeppelin Oracle Machine Learning
notebooks ready to run ML from browser
Database migration utility
Dedicated cloud-ready migration tools
for easy migration from Amazon
Redshift, SQL Server and other databases
Enterprise Grade Security
Data is encrypted by default in the cloud,
as well as in transit and at rest
High-Performance Queries
and Concurrent Workloads
Optimized query performance with
preconfigured resource profiles for different
types of users
Oracle SQL
Autonomous DW Cloud is compatible with
all business analytics tools that support
Oracle Database
Self Driving
Fully automated database for self-tuning
patching and upgrading itself while the
system is running
Cloud-Based Data Loading
Fast, scalable data-loading from Oracle
Object Store, AWS S3, or on-premises
Oracle Machine Learning
19
20. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Oracle Machine Learning and Advanced Analytics
• Support multiple data platforms, analytical engines, languages, UIs and
deployment strategies
Strategy and Road Map
Big Data / Big Data Cloud Relational
ML Algorithms
Common core, parallel, distributed
SQL R, Python, etc.GUI
Data Miner, RStudio
Notebooks
Advanced Analytics
Oracle Database Cloud DWCS
20
21. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
CLASSIFICATION
– Naïve Bayes
– Logistic Regression (GLM)
– Decision Tree
– Random Forest
– Neural Network
– Support Vector Machine
– Explicit Semantic Analysis
CLUSTERING
– Hierarchical K-Means
– Hierarchical O-Cluster
– Expectation Maximization (EM)
ANOMALY DETECTION
– One-Class SVM
TIME SERIES
– Holt-Winters, Regular & Irregular,
with and w/o trends & seasonal
– Single, Double Exp Smoothing
REGRESSION
– Linear Model
– Generalized Linear Model
– Support Vector Machine (SVM)
– Stepwise Linear regression
– Neural Network
– LASSO
ATTRIBUTE IMPORTANCE
– Minimum Description Length
– Principal Comp Analysis (PCA)
– Unsupervised Pair-wise KL Div
– CUR decomposition for row & AI
ASSOCIATION RULES
– A priori/ market basket
PREDICTIVE QUERIES
– Predict, cluster, detect, features
SQL ANALYTICS
– SQL Windows, SQL Patterns,
SQL Aggregates
A1 A2 A3 A4 A5 A6 A7
• OAA (Oracle Data Mining + Oracle R Enterprise) and ORAAH combined
• OAA includes support for Partitioned Models, Transactional, Unstructured, Geo-spatial, Graph data. etc,
Oracle’s Machine Learning & Adv. Analytics Algorithms
FEATURE EXTRACTION
– Principal Comp Analysis (PCA)
– Non-negative Matrix Factorization
– Singular Value Decomposition (SVD)
– Explicit Semantic Analysis (ESA)
TEXT MINING SUPPORT
– Algorithms support text type
– Tokenization and theme extraction
– Explicit Semantic Analysis (ESA) for
document similarity
STATISTICAL FUNCTIONS
– Basic statistics: min, max,
median, stdev, t-test, F-test,
Pearson’s, Chi-Sq, ANOVA, etc.
R PACKAGES
– CRAN R Algorithm Packages
through Embedded R Execution
– Spark MLlib algorithm integration
EXPORTABLE ML MODELS
– C and Java code for deployment
21
22. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Oracle Machine Learning
Key Features
• Collaborative UI for data scientists
– Packaged with Autonomous Data
Warehouse Cloud (V1)
– Easy access to shared notebooks,
templates, permissions, scheduler, etc.
– SQL ML algorithms API (V1)
– Supports deployment of ML analytics
Machine Learning Notebook for Autonomous Data Warehouse Cloud
22
23. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Oracle Machine Learning UI in ADW
23
26. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Conclusions
• ML is here to stay and is just getting started
• The last 2.5 years of advances in this field dwarfs the previous 50 years of
growth
• We need to identify use cases to make the business better
• Modeling and ML infrastructure will become standard aka AutoML
• Getting the right data to train matters to have a successful outcome
• Models will get better with sparse data
• Most enterprise applications are already using embedded ML
26