SlideShare a Scribd company logo
1 of 37
AI, Machine Learning and Deep
Learning
Sujit Pal, Abhishek Sharma
Outline
• Artificial Intelligence
• AI vs ML vs DL
• Machine Learning
o Example – Character recognition
o Another Example
o General Flow
o Need for Deep Learning
• Deep Learning
• Learn more ?
• References
Footer Text 2
Artificial Intelligence
• “ [The automation of] activities that we associate with
human thinking, activities such as decision-making,
problem solving, learning ..."(Bellman, 1978)
• "A field of study that seeks to explain and emulate
intelligent behavior in terms of computational processes"
(Schalkoff, 1 990)
• “The capability of a machine to immitate intellignet
human behavior”. (merriam-webster)
Footer Text 3
Artificial Intelligence
• Examples:
o Movie/ Songs recommendation
o Fraud Detection – credit card purchases
o Smart home devices
o Facebook – tagging friends
o Video Games
o Virtual Personal Assistants: Siri, Cortana
Footer Text 4
AI vs Machine Learning vs
Deep Learning
0
20
40
60
80
100
120
8/20/11 8/20/12 8/20/13 8/20/14 8/20/15
Artificial intelligence: (Worldwide)
Machine LEarning: (Worldwide)
deep learning: (Worldwide)
Google trends
Footer Text 5
AI vs Machine Learning vs
Deep Learning
Artificial Intelligence
Machine Learning
Deep Learning
Footer Text 6
Machine Learning
• Algorithms that do the learning without human
intervention.
• Learning is done based on examples (aka dataset).
• Goal:
o learning function f: x  y to make correct prediction for new input data
• Choose function family (logistic regression, support vector machines)
• Optimize parameters on training data: Minimize Loss ∑(f(x) - y)²
Footer Text 7
Character Recognition
o Dataset: notMNIST
• collection of extracted glyphs from publicly available fonts
notMNIST dataset: http://yaroslavvb.blogspot.com/2011/09/notmnist-dataset.html
Footer Text 8
Character Recognition
function = LogisticRegression()
features_testset =
test_dataset.reshape(test_dataset.shape[0], 28 * 28)
labels_testset = test_labels
feature_trainingset =
train_dataset[:sample_size].reshape(sample_size,
28*28)
labels_traininigset = train_labels[:sample_size]
function.fit(feature_trainingset, labels_traininigset)
function.score(features_testset, labels_testset)
Accuracy: 0.856199
prepare
model;
learn weights
prediction/
inference
evaluation
*Library: Scikit-learn
Footer Text 9
Behind the scenes:
• Training phase:
o Feature Extraction
o Data Normalization
Extract features;
normalize data
0 0 0 0 1 1 1 1
1 1 1 1 0 1 0 0
1 0 0 1 0 1 0 0
1 0 0 0 1 0 0 1
1 1 1 1 0 1 0 0
1 0 0 1 0 1 0 0
1 0 0 0 1 0 0 1
1 0 0 0 1 0 0 1
1 1 1 1 0 1 0 0
1 1 1 1 0 1 0 0
1 0 0 1 0 1 0 0
1 0 0 0 1 0 0 1
1 1 1 1 0 1 0 0
1 0 0 1 0 1 0 0
Footer Text 10
Behind the scenes:
is actually
0 0 0 0 1 1 1 1
1 1 1 1 0 1 0 0
1 0 0 1 0 1 0 0
1 0 0 0 1 0 0 1
1 1 1 1 0 1 0 0
1 0 0 1 0 1 0 0
1 0 0 0 1 0 0 1
1 0 0 0 1 0 0 1
1 1 1 1 0 1 0 0
1 1 1 1 0 1 0 0
1 0 0 1 0 1 0 0
1 0 0 0 1 0 0 1
1 1 1 1 0 1 0 0
1 0 0 1 0 1 0 0
Saved as pickle (python; serializes objects);
plotted used pyplot
Footer Text 11
Behind the scenes:
• Training phase:
o Model
• Learn weights/ parameters based on training data
o Goal: Minimize loss
• Function: Logistic Regression (aka logit)
o y = wTx + b
• w: weights ; x: features ; b: bias terms used for regularization
• y: predicted value
• Minimize: gradient descent approach/ stochastic gradient descent
o Iterative process
Footer Text 12
Gradient Descent
Picture: en.wikipedia.org/Creative Commons
• Assume locally convex Loss
function.
• Initialize weight vector W
with random values.
• Compute L(w)
• Randomly change one (or
some, or all values of W)
• Compute new L(w) and
difference.
• Update W with the difference
multiplied by learning rateη.
• Repeat until W converges or
Footer Text 13
Behind the scenes:
• Inference phase:
o Run the model against test data
o predicting how the model performs on new input data (data which it did not
encounter during training phase)
o Accuracy: 0.856199
Footer Text 14
Another example
• Classify email as spam or not
o https://github.com/abhi21/Spam-Classifier-NB
Footer Text 15
General ML approach
o Training Phase:
Training
data
Feature
Extraction
Model
ML
Algorithm
Footer Text 16
General ML approach
o Testing Phase:
Test
data
Model
(learnt during
training phase)
predictions
Footer Text 17
Need for Deep Learning
• Pros
• Automatic Feature Selection.
• Ability to re-use basic building blocks to compose
models tailored to different applications.
• Cons
• Tendency to over fit.
• Requires lots of data.
Footer Text 18
Motivating Example
• Typical Classification Problem – given n training examples each with
m features, we need to find a mapping F that produces the “best”
predictions ŷ.
• “Best” == minimize difference between ŷ and label y.
• Loss function quantifies notion of “best”.
Footer Text 19
Loss Function
• Visualization of Loss function for a
system with 2 features.
• Convex functions can be solved
analytically.
• Real life functions rarely convex.
• Gradient Descent is a numerical
optimization method to find optimal
points in the space.
• Guaranteed to find the global
optima for convex functions.
• Guaranteed to find local optima for
non-convex functions.
• Local optima usually “good enough”
for high dimensional space.
Pictures: en.wikipedia.org/Creative CommonsFooter Text 20
Linear Model
• Matrix Formulation:
where:
• y is a (n, 1) vector of predicted values.
• X is the (n, m) input matrix
• W is the (m, 1) weight vector – corresponds to the final
coefficients of the model.
• b is a constant – corresponds to the intercept of the
model.
Footer Text 21
Perceptron
• The Perceptron is an early Neural Network model.
• Each Perceptron takes multiple inputs and outputs a
binary value (0 or 1).
• Uses step function to compute binary output.
• Network of Connected Perceptrons make up model.
Picture: commons.wikimedia.org/Creative Commons
Footer Text 22
Sigmoid Neurons
• Similar to Perceptron neurons, but can output a continuous
value between 0 and 1.
• Output is differentiable, so back-propagation is possible.
• Called Activation Function in the literature.
• Other Activation Functions in use now as well.
Footer Text 23
Popular Toolkits
• Comprehensive List in the PyImageSearch blog My Top
9 Favorite Python Deep Learning Libraries from Adrian
Rosenbrock.
• I use the following.
o Caffe – written in C++, network architectures defined using
JSON, has Python interface for training and running networks.
Very mature and has many prebuilt models.
o Keras – Python wrapper that exposes very minimal and easy to
use interface. Useful if you are composing your architectures
from existing models.
o Tensorflow – written in C++ but Python API gives you full control
over the network. Useful if you are building new architectures (or
those not available already)
Footer Text 24
Handling Non Linear Data
• Demo - universality of Deep Learning techniques.
• Build and run progressively more complex networks to
handle datasets like these.
Footer Text 25
Building Blocks
• Fully Connected Networks
o First network model to become popular in Deep Learning.
o Has been applied to classification, generating embeddings for
natural language vocabularies, etc.
• Convolutional Neural Networks
o Exploits the geometry of the input.
o Applied to computer vision (image and video), classification and
natural language processing.
• Recurrent Neural Networks
o Exploits the temporal nature of the input.
o Applied to classification, audio and speech applications, natural
language processing, machine translation, image captioning, etc.
Footer Text 26
Fully Connected Networks
• Inspired by biology – axons.
• Every node in a layer is connected to every node in
the layer following it.
• Input to a layer is output of previous layer.
• Weight vector shared within each layer.
• Gradient of loss propagate backward to update
weights in each layer.
Picture: commons.wikimedia.org/Creative Commons
Footer Text 27
FCN (cont’d)
• Demo – MNIST digit recognition. Classify handwritten
digits into 10 classes.
Footer Text 28
Convolutional Neural Networks
• Inspired by biology – visual cortex.
• Input is broken up into multiple small regions and processed
by individual small networks.
• Alternating sequence of convolution and pooling.
• Convolution filter weights shared across image.
Picture: en.wikipedia.org/Creative Commons
Footer Text 29
CNN (cont’d)
• Convolution
• Pooling – max pooling over (2, 2) regions
• Alternate layers of convolution and pooling result in
production of “higher order features”.
• FCN Layers classify higher order features into scores and
classes with Softmax.
Footer Text 30
CNN (cont’d)
• Demo – classify MNIST digits, but this time using CNN to
exploit the geometry of the input data.
Footer Text 31
Recurrent Neural Network
• Biological inspiration: memory.
• Input at time step is combined with input from all previous time
steps.
• Weights shared between all networks in chain.
Footer Text 32
RNN (cont’d)
• RNN have vanishing gradient problem because of inputs
from many time steps back.
• LSTM (Long Short Term Memory) – designed to fix the
vanishing gradient problem, but performance intensive.
• GRU (Gated Recurrent Unit) – simplifies LSTM, results
in better performance.
• Good discussion on RNNs can be found here:
o Understanding LSTM Networks by Christopher Olah
o Recurrent Neural Network Tutorial, Parts 1-4 on the WildML
blog.
Footer Text 33
RNN (cont’d)
• Demo #1 – generative language model (example of
many to many type 1).
• Demo #2 – machine translation example (example of
many to many type 2).
• Demo #3 – sentiment classification (example of many to
one architecture).
Footer Text 34
Conclusion
Artificial Intelligence
Machine Learning
Deep Learning
Footer Text 35
Learn More!
Note: many concepts were not covered!
• Machine Learning (Tom M. Mitchell)
• Pattern Recognition and Machine Learning (Christopher
Bishop)
• MOOCs:
o Machine Learning – covers almost all the important concepts in Machine Learning
o Deep Learning on Udacity – good coverage of the basics of Deep Learning and
Tensorflow.
o CS224d on Stanford – Deep Learning for Natural Language Processing, taught by
Richard Socher.
o CS231n on Stanford – Convolutional Neural Networks for Visual Recognition.
• Deep Learning Enthusiasts meetup group
Footer Text 36
References
• Google Trends
• notMNIST Dataset:
http://yaroslavvb.blogspot.com/2011/09/notmnist-dataset.html
• http://www.cs.princeton.edu/courses/archive/spr08/cos511/scribe_no
tes/0204.pdf
• https://classroom.udacity.com/courses/ud730/
Footer Text 37

More Related Content

What's hot

Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...
Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...
Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...
Simplilearn
 
Machine Learning vs Deep Learning vs Artificial Intelligence | ML vs DL vs AI...
Machine Learning vs Deep Learning vs Artificial Intelligence | ML vs DL vs AI...Machine Learning vs Deep Learning vs Artificial Intelligence | ML vs DL vs AI...
Machine Learning vs Deep Learning vs Artificial Intelligence | ML vs DL vs AI...
Simplilearn
 
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
Simplilearn
 
An introduction to Machine Learning
An introduction to Machine LearningAn introduction to Machine Learning
An introduction to Machine Learning
butest
 
Deep learning - A Visual Introduction
Deep learning - A Visual IntroductionDeep learning - A Visual Introduction
Deep learning - A Visual Introduction
Lukas Masuch
 

What's hot (20)

Lecture 1: What is Machine Learning?
Lecture 1: What is Machine Learning?Lecture 1: What is Machine Learning?
Lecture 1: What is Machine Learning?
 
Machine Learning and its Applications
Machine Learning and its ApplicationsMachine Learning and its Applications
Machine Learning and its Applications
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
 
Intro to deep learning
Intro to deep learning Intro to deep learning
Intro to deep learning
 
Artificial Intelligence - Machine Learning Vs Deep Learning
Artificial Intelligence - Machine Learning Vs Deep LearningArtificial Intelligence - Machine Learning Vs Deep Learning
Artificial Intelligence - Machine Learning Vs Deep Learning
 
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNINGARTIFICIAL INTELLIGENCE AND MACHINE LEARNING
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING
 
Machine learning
Machine learningMachine learning
Machine learning
 
Machine Learning Algorithms
Machine Learning AlgorithmsMachine Learning Algorithms
Machine Learning Algorithms
 
An introduction to Machine Learning (and a little bit of Deep Learning)
An introduction to Machine Learning (and a little bit of Deep Learning)An introduction to Machine Learning (and a little bit of Deep Learning)
An introduction to Machine Learning (and a little bit of Deep Learning)
 
Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...
Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...
Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...
 
Machine Learning and Real-World Applications
Machine Learning and Real-World ApplicationsMachine Learning and Real-World Applications
Machine Learning and Real-World Applications
 
Machine Learning vs Deep Learning vs Artificial Intelligence | ML vs DL vs AI...
Machine Learning vs Deep Learning vs Artificial Intelligence | ML vs DL vs AI...Machine Learning vs Deep Learning vs Artificial Intelligence | ML vs DL vs AI...
Machine Learning vs Deep Learning vs Artificial Intelligence | ML vs DL vs AI...
 
Artificial Intelligence Machine Learning Deep Learning Ppt Powerpoint Present...
Artificial Intelligence Machine Learning Deep Learning Ppt Powerpoint Present...Artificial Intelligence Machine Learning Deep Learning Ppt Powerpoint Present...
Artificial Intelligence Machine Learning Deep Learning Ppt Powerpoint Present...
 
Machine learning ppt.
Machine learning ppt.Machine learning ppt.
Machine learning ppt.
 
Deep learning
Deep learning Deep learning
Deep learning
 
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
 
Deep Learning Explained
Deep Learning ExplainedDeep Learning Explained
Deep Learning Explained
 
An introduction to Machine Learning
An introduction to Machine LearningAn introduction to Machine Learning
An introduction to Machine Learning
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
 
Deep learning - A Visual Introduction
Deep learning - A Visual IntroductionDeep learning - A Visual Introduction
Deep learning - A Visual Introduction
 

Viewers also liked

Artificial intelligence in business
Artificial intelligence in businessArtificial intelligence in business
Artificial intelligence in business
Nisha Choudhary
 
Deep Learning for Data Scientists - Data Science ATL Meetup Presentation, 201...
Deep Learning for Data Scientists - Data Science ATL Meetup Presentation, 201...Deep Learning for Data Scientists - Data Science ATL Meetup Presentation, 201...
Deep Learning for Data Scientists - Data Science ATL Meetup Presentation, 201...
Andrew Gardner
 
Artificial Intelligence Presentation
Artificial Intelligence PresentationArtificial Intelligence Presentation
Artificial Intelligence Presentation
lpaviglianiti
 

Viewers also liked (20)

Azure Machine Learning
Azure Machine LearningAzure Machine Learning
Azure Machine Learning
 
Machine Learning and Artificial Intelligence
Machine Learning and Artificial IntelligenceMachine Learning and Artificial Intelligence
Machine Learning and Artificial Intelligence
 
Artificial intelligence in business
Artificial intelligence in businessArtificial intelligence in business
Artificial intelligence in business
 
How To Win Big Talent as a Small Business | EngageIn
How To Win Big Talent as a Small Business | EngageInHow To Win Big Talent as a Small Business | EngageIn
How To Win Big Talent as a Small Business | EngageIn
 
Transforming HR in the age of AI and robotics 2016
Transforming HR in the age of AI and robotics 2016Transforming HR in the age of AI and robotics 2016
Transforming HR in the age of AI and robotics 2016
 
Deep Learning: a birds eye view
Deep Learning: a birds eye viewDeep Learning: a birds eye view
Deep Learning: a birds eye view
 
Machine learning with scikitlearn
Machine learning with scikitlearnMachine learning with scikitlearn
Machine learning with scikitlearn
 
Neural networks and deep learning
Neural networks and deep learningNeural networks and deep learning
Neural networks and deep learning
 
Deep learning
Deep learningDeep learning
Deep learning
 
Intro to Deep Learning for Question Answering
Intro to Deep Learning for Question AnsweringIntro to Deep Learning for Question Answering
Intro to Deep Learning for Question Answering
 
Deep Learning Models for Question Answering
Deep Learning Models for Question AnsweringDeep Learning Models for Question Answering
Deep Learning Models for Question Answering
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
Deep Learning - Convolutional Neural Networks
Deep Learning - Convolutional Neural NetworksDeep Learning - Convolutional Neural Networks
Deep Learning - Convolutional Neural Networks
 
Deep Learning for Data Scientists - Data Science ATL Meetup Presentation, 201...
Deep Learning for Data Scientists - Data Science ATL Meetup Presentation, 201...Deep Learning for Data Scientists - Data Science ATL Meetup Presentation, 201...
Deep Learning for Data Scientists - Data Science ATL Meetup Presentation, 201...
 
Deep learning - Conceptual understanding and applications
Deep learning - Conceptual understanding and applicationsDeep learning - Conceptual understanding and applications
Deep learning - Conceptual understanding and applications
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
Deep Learning through Examples
Deep Learning through ExamplesDeep Learning through Examples
Deep Learning through Examples
 
Transform your Business with AI, Deep Learning and Machine Learning
Transform your Business with AI, Deep Learning and Machine LearningTransform your Business with AI, Deep Learning and Machine Learning
Transform your Business with AI, Deep Learning and Machine Learning
 
Deep Learning for NLP: An Introduction to Neural Word Embeddings
Deep Learning for NLP: An Introduction to Neural Word EmbeddingsDeep Learning for NLP: An Introduction to Neural Word Embeddings
Deep Learning for NLP: An Introduction to Neural Word Embeddings
 
Artificial Intelligence Presentation
Artificial Intelligence PresentationArtificial Intelligence Presentation
Artificial Intelligence Presentation
 

Similar to Artificial Intelligence, Machine Learning and Deep Learning

Deep Learning
Deep LearningDeep Learning
Deep Learning
Pierre de Lacaze
 
Separating Hype from Reality in Deep Learning with Sameer Farooqui
 Separating Hype from Reality in Deep Learning with Sameer Farooqui Separating Hype from Reality in Deep Learning with Sameer Farooqui
Separating Hype from Reality in Deep Learning with Sameer Farooqui
Databricks
 
Deep learning - a primer
Deep learning - a primerDeep learning - a primer
Deep learning - a primer
Uwe Friedrichsen
 
Deep learning - a primer
Deep learning - a primerDeep learning - a primer
Deep learning - a primer
Shirin Elsinghorst
 

Similar to Artificial Intelligence, Machine Learning and Deep Learning (20)

Fundamental of deep learning
Fundamental of deep learningFundamental of deep learning
Fundamental of deep learning
 
Deep Learning
Deep LearningDeep Learning
Deep Learning
 
Recurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRURecurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRU
 
MDEC Data Matters Series: machine learning and Deep Learning, A Primer
MDEC Data Matters Series: machine learning and Deep Learning, A PrimerMDEC Data Matters Series: machine learning and Deep Learning, A Primer
MDEC Data Matters Series: machine learning and Deep Learning, A Primer
 
Deep learning (2)
Deep learning (2)Deep learning (2)
Deep learning (2)
 
Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)
 
Practical ML
Practical MLPractical ML
Practical ML
 
Computer vision-nit-silchar-hackathon
Computer vision-nit-silchar-hackathonComputer vision-nit-silchar-hackathon
Computer vision-nit-silchar-hackathon
 
Deep Learning for Personalized Search and Recommender Systems
Deep Learning for Personalized Search and Recommender SystemsDeep Learning for Personalized Search and Recommender Systems
Deep Learning for Personalized Search and Recommender Systems
 
A brief introduction to recent segmentation methods
A brief introduction to recent segmentation methodsA brief introduction to recent segmentation methods
A brief introduction to recent segmentation methods
 
Visualization of Deep Learning
Visualization of Deep LearningVisualization of Deep Learning
Visualization of Deep Learning
 
Separating Hype from Reality in Deep Learning with Sameer Farooqui
 Separating Hype from Reality in Deep Learning with Sameer Farooqui Separating Hype from Reality in Deep Learning with Sameer Farooqui
Separating Hype from Reality in Deep Learning with Sameer Farooqui
 
Teach a neural network to read handwriting
Teach a neural network to read handwritingTeach a neural network to read handwriting
Teach a neural network to read handwriting
 
introduction to deeplearning
introduction to deeplearningintroduction to deeplearning
introduction to deeplearning
 
物件偵測與辨識技術
物件偵測與辨識技術物件偵測與辨識技術
物件偵測與辨識技術
 
20190927 generative models_aia
20190927 generative models_aia20190927 generative models_aia
20190927 generative models_aia
 
Automatic Attendace using convolutional neural network Face Recognition
Automatic Attendace using convolutional neural network Face RecognitionAutomatic Attendace using convolutional neural network Face Recognition
Automatic Attendace using convolutional neural network Face Recognition
 
Deep learning for molecules, introduction to chainer chemistry
Deep learning for molecules, introduction to chainer chemistryDeep learning for molecules, introduction to chainer chemistry
Deep learning for molecules, introduction to chainer chemistry
 
Deep learning - a primer
Deep learning - a primerDeep learning - a primer
Deep learning - a primer
 
Deep learning - a primer
Deep learning - a primerDeep learning - a primer
Deep learning - a primer
 

More from Sujit Pal

Building Learning to Rank (LTR) search reranking models using Large Language ...
Building Learning to Rank (LTR) search reranking models using Large Language ...Building Learning to Rank (LTR) search reranking models using Large Language ...
Building Learning to Rank (LTR) search reranking models using Large Language ...
Sujit Pal
 
Using Graph and Transformer Embeddings for Vector Based Retrieval
Using Graph and Transformer Embeddings for Vector Based RetrievalUsing Graph and Transformer Embeddings for Vector Based Retrieval
Using Graph and Transformer Embeddings for Vector Based Retrieval
Sujit Pal
 
Question Answering as Search - the Anserini Pipeline and Other Stories
Question Answering as Search - the Anserini Pipeline and Other StoriesQuestion Answering as Search - the Anserini Pipeline and Other Stories
Question Answering as Search - the Anserini Pipeline and Other Stories
Sujit Pal
 
Building Named Entity Recognition Models Efficiently using NERDS
Building Named Entity Recognition Models Efficiently using NERDSBuilding Named Entity Recognition Models Efficiently using NERDS
Building Named Entity Recognition Models Efficiently using NERDS
Sujit Pal
 

More from Sujit Pal (20)

Supporting Concept Search using a Clinical Healthcare Knowledge Graph
Supporting Concept Search using a Clinical Healthcare Knowledge GraphSupporting Concept Search using a Clinical Healthcare Knowledge Graph
Supporting Concept Search using a Clinical Healthcare Knowledge Graph
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Building Learning to Rank (LTR) search reranking models using Large Language ...
Building Learning to Rank (LTR) search reranking models using Large Language ...Building Learning to Rank (LTR) search reranking models using Large Language ...
Building Learning to Rank (LTR) search reranking models using Large Language ...
 
Cheap Trick for Question Answering
Cheap Trick for Question AnsweringCheap Trick for Question Answering
Cheap Trick for Question Answering
 
Searching Across Images and Test
Searching Across Images and TestSearching Across Images and Test
Searching Across Images and Test
 
Learning a Joint Embedding Representation for Image Search using Self-supervi...
Learning a Joint Embedding Representation for Image Search using Self-supervi...Learning a Joint Embedding Representation for Image Search using Self-supervi...
Learning a Joint Embedding Representation for Image Search using Self-supervi...
 
The power of community: training a Transformer Language Model on a shoestring
The power of community: training a Transformer Language Model on a shoestringThe power of community: training a Transformer Language Model on a shoestring
The power of community: training a Transformer Language Model on a shoestring
 
Backprop Visualization
Backprop VisualizationBackprop Visualization
Backprop Visualization
 
Accelerating NLP with Dask and Saturn Cloud
Accelerating NLP with Dask and Saturn CloudAccelerating NLP with Dask and Saturn Cloud
Accelerating NLP with Dask and Saturn Cloud
 
Accelerating NLP with Dask on Saturn Cloud: A case study with CORD-19
Accelerating NLP with Dask on Saturn Cloud: A case study with CORD-19Accelerating NLP with Dask on Saturn Cloud: A case study with CORD-19
Accelerating NLP with Dask on Saturn Cloud: A case study with CORD-19
 
Leslie Smith's Papers discussion for DL Journal Club
Leslie Smith's Papers discussion for DL Journal ClubLeslie Smith's Papers discussion for DL Journal Club
Leslie Smith's Papers discussion for DL Journal Club
 
Using Graph and Transformer Embeddings for Vector Based Retrieval
Using Graph and Transformer Embeddings for Vector Based RetrievalUsing Graph and Transformer Embeddings for Vector Based Retrieval
Using Graph and Transformer Embeddings for Vector Based Retrieval
 
Transformer Mods for Document Length Inputs
Transformer Mods for Document Length InputsTransformer Mods for Document Length Inputs
Transformer Mods for Document Length Inputs
 
Question Answering as Search - the Anserini Pipeline and Other Stories
Question Answering as Search - the Anserini Pipeline and Other StoriesQuestion Answering as Search - the Anserini Pipeline and Other Stories
Question Answering as Search - the Anserini Pipeline and Other Stories
 
Building Named Entity Recognition Models Efficiently using NERDS
Building Named Entity Recognition Models Efficiently using NERDSBuilding Named Entity Recognition Models Efficiently using NERDS
Building Named Entity Recognition Models Efficiently using NERDS
 
Graph Techniques for Natural Language Processing
Graph Techniques for Natural Language ProcessingGraph Techniques for Natural Language Processing
Graph Techniques for Natural Language Processing
 
Learning to Rank Presentation (v2) at LexisNexis Search Guild
Learning to Rank Presentation (v2) at LexisNexis Search GuildLearning to Rank Presentation (v2) at LexisNexis Search Guild
Learning to Rank Presentation (v2) at LexisNexis Search Guild
 
Search summit-2018-ltr-presentation
Search summit-2018-ltr-presentationSearch summit-2018-ltr-presentation
Search summit-2018-ltr-presentation
 
Search summit-2018-content-engineering-slides
Search summit-2018-content-engineering-slidesSearch summit-2018-content-engineering-slides
Search summit-2018-content-engineering-slides
 
SoDA v2 - Named Entity Recognition from streaming text
SoDA v2 - Named Entity Recognition from streaming textSoDA v2 - Named Entity Recognition from streaming text
SoDA v2 - Named Entity Recognition from streaming text
 

Recently uploaded

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Recently uploaded (20)

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 

Artificial Intelligence, Machine Learning and Deep Learning

  • 1. AI, Machine Learning and Deep Learning Sujit Pal, Abhishek Sharma
  • 2. Outline • Artificial Intelligence • AI vs ML vs DL • Machine Learning o Example – Character recognition o Another Example o General Flow o Need for Deep Learning • Deep Learning • Learn more ? • References Footer Text 2
  • 3. Artificial Intelligence • “ [The automation of] activities that we associate with human thinking, activities such as decision-making, problem solving, learning ..."(Bellman, 1978) • "A field of study that seeks to explain and emulate intelligent behavior in terms of computational processes" (Schalkoff, 1 990) • “The capability of a machine to immitate intellignet human behavior”. (merriam-webster) Footer Text 3
  • 4. Artificial Intelligence • Examples: o Movie/ Songs recommendation o Fraud Detection – credit card purchases o Smart home devices o Facebook – tagging friends o Video Games o Virtual Personal Assistants: Siri, Cortana Footer Text 4
  • 5. AI vs Machine Learning vs Deep Learning 0 20 40 60 80 100 120 8/20/11 8/20/12 8/20/13 8/20/14 8/20/15 Artificial intelligence: (Worldwide) Machine LEarning: (Worldwide) deep learning: (Worldwide) Google trends Footer Text 5
  • 6. AI vs Machine Learning vs Deep Learning Artificial Intelligence Machine Learning Deep Learning Footer Text 6
  • 7. Machine Learning • Algorithms that do the learning without human intervention. • Learning is done based on examples (aka dataset). • Goal: o learning function f: x  y to make correct prediction for new input data • Choose function family (logistic regression, support vector machines) • Optimize parameters on training data: Minimize Loss ∑(f(x) - y)² Footer Text 7
  • 8. Character Recognition o Dataset: notMNIST • collection of extracted glyphs from publicly available fonts notMNIST dataset: http://yaroslavvb.blogspot.com/2011/09/notmnist-dataset.html Footer Text 8
  • 9. Character Recognition function = LogisticRegression() features_testset = test_dataset.reshape(test_dataset.shape[0], 28 * 28) labels_testset = test_labels feature_trainingset = train_dataset[:sample_size].reshape(sample_size, 28*28) labels_traininigset = train_labels[:sample_size] function.fit(feature_trainingset, labels_traininigset) function.score(features_testset, labels_testset) Accuracy: 0.856199 prepare model; learn weights prediction/ inference evaluation *Library: Scikit-learn Footer Text 9
  • 10. Behind the scenes: • Training phase: o Feature Extraction o Data Normalization Extract features; normalize data 0 0 0 0 1 1 1 1 1 1 1 1 0 1 0 0 1 0 0 1 0 1 0 0 1 0 0 0 1 0 0 1 1 1 1 1 0 1 0 0 1 0 0 1 0 1 0 0 1 0 0 0 1 0 0 1 1 0 0 0 1 0 0 1 1 1 1 1 0 1 0 0 1 1 1 1 0 1 0 0 1 0 0 1 0 1 0 0 1 0 0 0 1 0 0 1 1 1 1 1 0 1 0 0 1 0 0 1 0 1 0 0 Footer Text 10
  • 11. Behind the scenes: is actually 0 0 0 0 1 1 1 1 1 1 1 1 0 1 0 0 1 0 0 1 0 1 0 0 1 0 0 0 1 0 0 1 1 1 1 1 0 1 0 0 1 0 0 1 0 1 0 0 1 0 0 0 1 0 0 1 1 0 0 0 1 0 0 1 1 1 1 1 0 1 0 0 1 1 1 1 0 1 0 0 1 0 0 1 0 1 0 0 1 0 0 0 1 0 0 1 1 1 1 1 0 1 0 0 1 0 0 1 0 1 0 0 Saved as pickle (python; serializes objects); plotted used pyplot Footer Text 11
  • 12. Behind the scenes: • Training phase: o Model • Learn weights/ parameters based on training data o Goal: Minimize loss • Function: Logistic Regression (aka logit) o y = wTx + b • w: weights ; x: features ; b: bias terms used for regularization • y: predicted value • Minimize: gradient descent approach/ stochastic gradient descent o Iterative process Footer Text 12
  • 13. Gradient Descent Picture: en.wikipedia.org/Creative Commons • Assume locally convex Loss function. • Initialize weight vector W with random values. • Compute L(w) • Randomly change one (or some, or all values of W) • Compute new L(w) and difference. • Update W with the difference multiplied by learning rateη. • Repeat until W converges or Footer Text 13
  • 14. Behind the scenes: • Inference phase: o Run the model against test data o predicting how the model performs on new input data (data which it did not encounter during training phase) o Accuracy: 0.856199 Footer Text 14
  • 15. Another example • Classify email as spam or not o https://github.com/abhi21/Spam-Classifier-NB Footer Text 15
  • 16. General ML approach o Training Phase: Training data Feature Extraction Model ML Algorithm Footer Text 16
  • 17. General ML approach o Testing Phase: Test data Model (learnt during training phase) predictions Footer Text 17
  • 18. Need for Deep Learning • Pros • Automatic Feature Selection. • Ability to re-use basic building blocks to compose models tailored to different applications. • Cons • Tendency to over fit. • Requires lots of data. Footer Text 18
  • 19. Motivating Example • Typical Classification Problem – given n training examples each with m features, we need to find a mapping F that produces the “best” predictions ŷ. • “Best” == minimize difference between ŷ and label y. • Loss function quantifies notion of “best”. Footer Text 19
  • 20. Loss Function • Visualization of Loss function for a system with 2 features. • Convex functions can be solved analytically. • Real life functions rarely convex. • Gradient Descent is a numerical optimization method to find optimal points in the space. • Guaranteed to find the global optima for convex functions. • Guaranteed to find local optima for non-convex functions. • Local optima usually “good enough” for high dimensional space. Pictures: en.wikipedia.org/Creative CommonsFooter Text 20
  • 21. Linear Model • Matrix Formulation: where: • y is a (n, 1) vector of predicted values. • X is the (n, m) input matrix • W is the (m, 1) weight vector – corresponds to the final coefficients of the model. • b is a constant – corresponds to the intercept of the model. Footer Text 21
  • 22. Perceptron • The Perceptron is an early Neural Network model. • Each Perceptron takes multiple inputs and outputs a binary value (0 or 1). • Uses step function to compute binary output. • Network of Connected Perceptrons make up model. Picture: commons.wikimedia.org/Creative Commons Footer Text 22
  • 23. Sigmoid Neurons • Similar to Perceptron neurons, but can output a continuous value between 0 and 1. • Output is differentiable, so back-propagation is possible. • Called Activation Function in the literature. • Other Activation Functions in use now as well. Footer Text 23
  • 24. Popular Toolkits • Comprehensive List in the PyImageSearch blog My Top 9 Favorite Python Deep Learning Libraries from Adrian Rosenbrock. • I use the following. o Caffe – written in C++, network architectures defined using JSON, has Python interface for training and running networks. Very mature and has many prebuilt models. o Keras – Python wrapper that exposes very minimal and easy to use interface. Useful if you are composing your architectures from existing models. o Tensorflow – written in C++ but Python API gives you full control over the network. Useful if you are building new architectures (or those not available already) Footer Text 24
  • 25. Handling Non Linear Data • Demo - universality of Deep Learning techniques. • Build and run progressively more complex networks to handle datasets like these. Footer Text 25
  • 26. Building Blocks • Fully Connected Networks o First network model to become popular in Deep Learning. o Has been applied to classification, generating embeddings for natural language vocabularies, etc. • Convolutional Neural Networks o Exploits the geometry of the input. o Applied to computer vision (image and video), classification and natural language processing. • Recurrent Neural Networks o Exploits the temporal nature of the input. o Applied to classification, audio and speech applications, natural language processing, machine translation, image captioning, etc. Footer Text 26
  • 27. Fully Connected Networks • Inspired by biology – axons. • Every node in a layer is connected to every node in the layer following it. • Input to a layer is output of previous layer. • Weight vector shared within each layer. • Gradient of loss propagate backward to update weights in each layer. Picture: commons.wikimedia.org/Creative Commons Footer Text 27
  • 28. FCN (cont’d) • Demo – MNIST digit recognition. Classify handwritten digits into 10 classes. Footer Text 28
  • 29. Convolutional Neural Networks • Inspired by biology – visual cortex. • Input is broken up into multiple small regions and processed by individual small networks. • Alternating sequence of convolution and pooling. • Convolution filter weights shared across image. Picture: en.wikipedia.org/Creative Commons Footer Text 29
  • 30. CNN (cont’d) • Convolution • Pooling – max pooling over (2, 2) regions • Alternate layers of convolution and pooling result in production of “higher order features”. • FCN Layers classify higher order features into scores and classes with Softmax. Footer Text 30
  • 31. CNN (cont’d) • Demo – classify MNIST digits, but this time using CNN to exploit the geometry of the input data. Footer Text 31
  • 32. Recurrent Neural Network • Biological inspiration: memory. • Input at time step is combined with input from all previous time steps. • Weights shared between all networks in chain. Footer Text 32
  • 33. RNN (cont’d) • RNN have vanishing gradient problem because of inputs from many time steps back. • LSTM (Long Short Term Memory) – designed to fix the vanishing gradient problem, but performance intensive. • GRU (Gated Recurrent Unit) – simplifies LSTM, results in better performance. • Good discussion on RNNs can be found here: o Understanding LSTM Networks by Christopher Olah o Recurrent Neural Network Tutorial, Parts 1-4 on the WildML blog. Footer Text 33
  • 34. RNN (cont’d) • Demo #1 – generative language model (example of many to many type 1). • Demo #2 – machine translation example (example of many to many type 2). • Demo #3 – sentiment classification (example of many to one architecture). Footer Text 34
  • 36. Learn More! Note: many concepts were not covered! • Machine Learning (Tom M. Mitchell) • Pattern Recognition and Machine Learning (Christopher Bishop) • MOOCs: o Machine Learning – covers almost all the important concepts in Machine Learning o Deep Learning on Udacity – good coverage of the basics of Deep Learning and Tensorflow. o CS224d on Stanford – Deep Learning for Natural Language Processing, taught by Richard Socher. o CS231n on Stanford – Convolutional Neural Networks for Visual Recognition. • Deep Learning Enthusiasts meetup group Footer Text 36
  • 37. References • Google Trends • notMNIST Dataset: http://yaroslavvb.blogspot.com/2011/09/notmnist-dataset.html • http://www.cs.princeton.edu/courses/archive/spr08/cos511/scribe_no tes/0204.pdf • https://classroom.udacity.com/courses/ud730/ Footer Text 37