3 - Deep Learning
3 - Deep Learning
Madhuri Prabhala
Overview
Overview of the class
❑ Neural networks
o Weights and biases
o Forward propogations
o Backward propogations
o Activation function
o Gradient descent
Yes Monthly
Offer home loan or not? income
Model
Home loan
No approved?
Rs. 45000
Low Applicant’s salary High
Steps in the model
X Y
Steps in the model
Father’s
X3 salary
Steps in the model
X1 + X2 + X3 > Threshold
Spouse’s
X1 salary
= > X1 + X2 + X3 – Threshold > 0
Threshold of 45,000 is based
on total household income
= > X1 + X2 + X3 – Bias > 0
Applica
X2 nt’s Home loan Y
salary approved?
Z = X1 + X2 + X3 + bias
Output =
0 (for Z < 0)
Bias -45000
Deep Learning Models
❑ Typically used in the case of unstructured data. Use of training data to improve prediction accuracy.
❑ Multi-layer perceptron
o Number of hidden layers
o Number of neurons in the hidden layers
o Input layers
o Number of neurons in the output layers
❑ Use of newly created features to create more features and other hidden layers
Sentiment Classification
Sequence modeling in text – Use case – Search queries
Is Amazon a better E-
commerce site Sequence
compared to Flipkart? Models
Language translation
Sequence modeling in text – Use case – Chat bots
Please suggest a
suitable Insurance Sequence Sure, I will help you
policy. Models choose a suitable policy.
Dialogue systems
Sequence modeling in text – Use case – Text summarization
Text summarization
NLP for Deep Learning
Preparing text for deep learning models
1.Text pre-processing
Text cleaning Remove text noise Unwanted or useless information in the text
• URLs, punctuation marks, numbers, special
characters
• Slangs – Bro, dope,etc.
• Spelling mistakes – cntrl, defntly
Text pre-processing
❑ Another encoding can have some other characteristics to represent the English English ASCII Code
characters
a 097
❑ It is important to have a standard encoding of all kinds of text, before any b 098
modeling or analysis on text
c 099
❑ UTF – 8 – Universally accepted encoding for most languages d 100
o All text data should be available in UTF-8 to avoid any discrepancy e 101
o Preferred to convert all text to lower-case.
E.g. Pen and pen are treated differently by the computer f 102
Text cleaning
Representing text data numerically
0 0 1 0 0
1 0 0 0 0
0 1 0 0 0
0 0 0 1 0
0 0 0 0 1
Text representation – One hot encoding - Steps
Give me the book. give me the book give, me, the, book
Steps in one hot encoding – Creating the one hot vector
o Even with a vocabulary size of 40,000, there can be a vector of 300 to 400
Mango
Guava
Cheetah
Leopard
Rooster
Hen
Obtaining Word embeddings - Approaches