SlideShare a Scribd company logo
1 of 73
Download to read offline
ICEBREAKER
Huỳnh Ngọc Như
@nhu.huynh1142002
Let’s get to know each other!
Rules:
- The game includes 1 small example and 7 questions
- Based on the hints given, including pictures, scrambled letters, you will
have 20 seconds to come up with the correct word
- The person with the earliest correct answers will get 1 point.
y/b/ứ/t/ả/h
Example:
T h ứ b ả y
_ _ _ _ _ _
Get ready?
ầ/k/n/h/i/h/t/n
Question 1:
T h ầ n k i n h
_ _ _ _ _ _ _ _
á/c/y/ọ/m/h
Question 2:
H ọ c m á y
_ _ _ _ _ _
n/z/o/p/o/i/t/i/a/m/t/i
Question 3:
O p t i m i z a t i o n
_ _ _ _ _ _ _ _ _ _ _ _
n/h/ế/t/n/y/n/u/t/í
Question 4:
T u y ế n t í n h
_ _ _ _ _ _ _ _ _
Question 5:
A r t i f i c i a l I n t e l l i g e n c e
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
g/i/o/s/l/i/t/c
Question 6:
L o g i s t i c
_ _ _ _ _ _ _ _
u/n/t/s/f/n/o/i/c
Question 7:
F u n c t i o n s
_ _ _ _ _ _ _ _ _
Summary
1. Thần kinh (Neuron/Neural Network)
2. Học máy (Machine Learning)
3. Optimization (Tối ưu hoá)
4. Tuyến tính (Linear)
5. Artificial Intelligence (Trí tuệ nhân tạo)
6. Logistic
7. Functions (Hàm số)
how-to-AI Series: Unlock Potential
Day 2: Build UP your own Neural
Network
Phạm Khánh Trình
@trinh.phamkhanh
Nguyễn Thế Bình
@binh.nguyen288
Outline
1. Break the ice
2. Linear Regression & Logistic Regression
3. Neural Network
4. Demo Time
Common AI & ML
Problems
How to model the relations between the variables?
Fig 1: Regression Fig 2: Classification
Linear Regression
Logistic Regression
Univariate Linear
Regression
Basic idea of Univariate LR:
Given some data points (x, y).
We find the red line y = wx + b that best describe / fit the data!
Index x y
0 1 2
1 2 4
2 3 6
3 4 8
4 5 10
5 6 12
6 7 14
7 8 16
8 9 18
We define a function with respect to w and b, called the loss function L, for
instance
The best fit line is the line with minimum value loss function!
What does it mean by “best fit”?
It’s just an optimization problem
That makes sense, but how do we
find the optimal value of w and b?
Two optimization approach
- Using Calculus 2 to find the closed-form formula
(not always possible)
- Iterative algorithm: Gradient Descent
Step 1: Compute the gradient
Step 2: Find stationary points by letting the gradient
zero:
Formula derivation using Calculus 2
Using gradient descent
Loop 7749 times:
Wait, how does that even work?
Sound familiar, right?
Fig 1: One variable Fig 2: Two variables
The influence of learning rate
It’s a way to control the magnitude of gradients
Fig 1: Too small gradient Fig 2: Too large gradient
Multivariate Linear
Regression
Limitation of naive linear regression
We have more than 1 variables
Modeling polynomial relation
Linear regression can be not “linear”
- Step 1: Collect the relevant data (the data points)
- Step 2: Choose a suitable model (linear regression for example)
- Step 3: Choose a loss function with respect to the data (such as SSE)
- Step 4: Minimize the loss function with respect to the parameters using an
optimization algorithm (Gradient Descent)
Let’s backtrack
There are 4 steps to build a machine learning model
Linear regression
Logistic regression
Logistic
Regression
Linear regression in classification?
Just don’t :)
Sometime we want the output of the function to be:
- Strictly increasing and analytical
- Bounded in (0, 1) to be probabilistic
The sigmoid function is a perfect fit for both of these
Sigmoid function, an activation function
Yet another function to learn, huh?
In logistic regression, we apply sigmoid function on top of linear regression in
order to squeeze output range into (0, 1)
Logistic regression idea
Basically, that’s sigmoid(linear regression)
The choice of loss function
Gradient descent could only reach local minima
for non-convex functions
Since the label of logistic problem can be only be binary, we can be a little bit
smarter
What is wrong with sum of squares?
Formula of binary cross entropy
In short, by using this loss function, the loss function is now convex.
Binary cross entropy
Note: Multiclass variant of this is cross entropy
Linear Regression
Logistic Regression
Optimization?
Sadly, there is no closed-form formula for Logistic Regression, here
is the gradient for univariate case, good luck solving those :)
Thus the only choice here is Gradient Descent.
Kahoot time!
Logistic regression can be used to infer whether a feature is active of not
according to the given features, by stacking up multiple logistic regressions, we
get the fundamental idea of neural network
Insight of Logistic Regression
Motivation to neural network
Neural Network
What is a Neural Network?
A human brain or something?
Artificial Neural Network (ANN)
Neural Network
Source: https://www.packtpub.com/product/deep-learning-essentials/9781785880360
Rosenblatt’s work: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.335.3398&rep=rep1&type=pdf
History
“Later Perceptrons will be able to recognize people
and call out their names and instantly translate
speech in one language to speech or writing in
another language, it was predicted.”
NY Times ━ "New Navy Device Learns By Doing" 7/7/1958
Reminder: Logistic Regression
Source: https://pythonmachinelearning.pro/perceptrons-the-first-neural-networks/
Reminder: Logistic Regression
Source: https://www.coursera.org/learn/machine-learning
XOR Problem
XOR Solution
XOR Solution
XOR Solution
Another Case
Source:
https://towardsdatascience.com/beginners-ask-how-many-hidden-layers-neurons-to-use-in-artificial-neural-networks-51466afa0d3e
Reminder: Logistic Regression
Source: https://www.coursera.org/learn/machine-learning
Neural Network
Backpropagation
Activation
Softmax Function
“Data scientists call the layer-by-layer process of
matrix multiplication followed by non-linear
activation functions, transforming the feature
space.”
Alando Ballantyne ━ Minsky's "And / Or" Theorem: A Single Perceptron Limitations.
Step 1: Determine the network structure (the number of layers, which activation
functions to choose).
Step 2: Load the data as input to the Neural Network
Repeat {
Step 3: Forward the data through the network, calculate the Loss function.
Step 4: Backpropagation to find the weight gradients → update the weights.
} Until convergence.
Let’s recap!
Neural Network in a nutshell
How does Neural Network works?
Flatten
Neural Network
Basically, it is a complex function (a combination of many
functions) to solve a complex task.
“The result of a Neural Network can approximate any
well-behaved function 𝟋 by using the same
construction for the first layer and approximating the
identity function with later layers.”
Universal Approximation Theorem
State-of-the-art Neural Network
Convolutional Neural Network
Recurrent Neural Network
Let’s play some codes!
https://colab.research.google.com/drive/1bOQdxTtE2Ge73
gbKuH2Dpk8mXBFwJmXw?usp=sharing
Q&A
Feedback form
https://tinyurl.com/a78ahspe
Thank You!

More Related Content

What's hot

Reinforcement learning Research experiments OpenAI
Reinforcement learning Research experiments OpenAIReinforcement learning Research experiments OpenAI
Reinforcement learning Research experiments OpenAI
Raouf KESKES
 
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Simplilearn
 

What's hot (20)

Basic image analysis(processing and classification) and visualization using m...
Basic image analysis(processing and classification) and visualization using m...Basic image analysis(processing and classification) and visualization using m...
Basic image analysis(processing and classification) and visualization using m...
 
Hyperparameter Tuning
Hyperparameter TuningHyperparameter Tuning
Hyperparameter Tuning
 
Kaggle presentation
Kaggle presentationKaggle presentation
Kaggle presentation
 
AWS Certified Machine Learning Specialty
AWS Certified Machine Learning Specialty AWS Certified Machine Learning Specialty
AWS Certified Machine Learning Specialty
 
H2O World - Top 10 Deep Learning Tips & Tricks - Arno Candel
H2O World - Top 10 Deep Learning Tips & Tricks - Arno CandelH2O World - Top 10 Deep Learning Tips & Tricks - Arno Candel
H2O World - Top 10 Deep Learning Tips & Tricks - Arno Candel
 
Understanding Basics of Machine Learning
Understanding Basics of Machine LearningUnderstanding Basics of Machine Learning
Understanding Basics of Machine Learning
 
Machine learning basics
Machine learning basics Machine learning basics
Machine learning basics
 
Machine Learning Basics
Machine Learning BasicsMachine Learning Basics
Machine Learning Basics
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
Overfitting & Underfitting
Overfitting & UnderfittingOverfitting & Underfitting
Overfitting & Underfitting
 
Machine Learning basics
Machine Learning basicsMachine Learning basics
Machine Learning basics
 
2018 Global Azure Bootcamp Azure Machine Learning for neural networks
2018 Global Azure Bootcamp Azure Machine Learning for neural networks2018 Global Azure Bootcamp Azure Machine Learning for neural networks
2018 Global Azure Bootcamp Azure Machine Learning for neural networks
 
Reinforcement learning Research experiments OpenAI
Reinforcement learning Research experiments OpenAIReinforcement learning Research experiments OpenAI
Reinforcement learning Research experiments OpenAI
 
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
 
BI_Final_Group_1
BI_Final_Group_1BI_Final_Group_1
BI_Final_Group_1
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
Winning Kaggle 101: Introduction to Stacking
Winning Kaggle 101: Introduction to StackingWinning Kaggle 101: Introduction to Stacking
Winning Kaggle 101: Introduction to Stacking
 
Machine learning the next revolution or just another hype
Machine learning   the next revolution or just another hypeMachine learning   the next revolution or just another hype
Machine learning the next revolution or just another hype
 
Deep Dive into Hyperparameter Tuning
Deep Dive into Hyperparameter TuningDeep Dive into Hyperparameter Tuning
Deep Dive into Hyperparameter Tuning
 
Algorithm
AlgorithmAlgorithm
Algorithm
 

Similar to Day 2 build up your own neural network

Machine Learning ICS 273A
Machine Learning ICS 273AMachine Learning ICS 273A
Machine Learning ICS 273A
butest
 
Bca2020 data structure and algorithm
Bca2020   data structure and algorithmBca2020   data structure and algorithm
Bca2020 data structure and algorithm
smumbahelp
 
Machine Learning: Foundations Course Number 0368403401
Machine Learning: Foundations Course Number 0368403401Machine Learning: Foundations Course Number 0368403401
Machine Learning: Foundations Course Number 0368403401
butest
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
butest
 
Introduction to Machine Vision
Introduction to Machine VisionIntroduction to Machine Vision
Introduction to Machine Vision
Nasir Jumani
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AI
Vishal Singh
 

Similar to Day 2 build up your own neural network (20)

Machine Learning ICS 273A
Machine Learning ICS 273AMachine Learning ICS 273A
Machine Learning ICS 273A
 
Bca2020 data structure and algorithm
Bca2020   data structure and algorithmBca2020   data structure and algorithm
Bca2020 data structure and algorithm
 
nlp dl 1.pdf
nlp dl 1.pdfnlp dl 1.pdf
nlp dl 1.pdf
 
Deep learning (2)
Deep learning (2)Deep learning (2)
Deep learning (2)
 
Machine learning introduction
Machine learning introductionMachine learning introduction
Machine learning introduction
 
Deep learning from scratch
Deep learning from scratch Deep learning from scratch
Deep learning from scratch
 
What Deep Learning Means for Artificial Intelligence
What Deep Learning Means for Artificial IntelligenceWhat Deep Learning Means for Artificial Intelligence
What Deep Learning Means for Artificial Intelligence
 
ProjectReport
ProjectReportProjectReport
ProjectReport
 
Understanding Deep Learning & Parameter Tuning with MXnet, H2o Package in R
Understanding Deep Learning & Parameter Tuning with MXnet, H2o Package in RUnderstanding Deep Learning & Parameter Tuning with MXnet, H2o Package in R
Understanding Deep Learning & Parameter Tuning with MXnet, H2o Package in R
 
Camp IT: Making the World More Efficient Using AI & Machine Learning
Camp IT: Making the World More Efficient Using AI & Machine LearningCamp IT: Making the World More Efficient Using AI & Machine Learning
Camp IT: Making the World More Efficient Using AI & Machine Learning
 
Predict saturated thickness using tensor board visualization
Predict saturated thickness using tensor board visualizationPredict saturated thickness using tensor board visualization
Predict saturated thickness using tensor board visualization
 
Neural Nets Deconstructed
Neural Nets DeconstructedNeural Nets Deconstructed
Neural Nets Deconstructed
 
Machine Learning: Foundations Course Number 0368403401
Machine Learning: Foundations Course Number 0368403401Machine Learning: Foundations Course Number 0368403401
Machine Learning: Foundations Course Number 0368403401
 
21AI401 AI Unit 1.pdf
21AI401 AI Unit 1.pdf21AI401 AI Unit 1.pdf
21AI401 AI Unit 1.pdf
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
 
Recursive algorithms in depth - Geek gap webinar #2
Recursive algorithms in depth - Geek gap webinar #2Recursive algorithms in depth - Geek gap webinar #2
Recursive algorithms in depth - Geek gap webinar #2
 
Neural Learning to Rank
Neural Learning to RankNeural Learning to Rank
Neural Learning to Rank
 
Mat189: Cluster Analysis with NBA Sports Data
Mat189: Cluster Analysis with NBA Sports DataMat189: Cluster Analysis with NBA Sports Data
Mat189: Cluster Analysis with NBA Sports Data
 
Introduction to Machine Vision
Introduction to Machine VisionIntroduction to Machine Vision
Introduction to Machine Vision
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AI
 

More from HuyPhmNht2 (6)

Slide.pptx
Slide.pptxSlide.pptx
Slide.pptx
 
Introduction to figma
Introduction to figmaIntroduction to figma
Introduction to figma
 
Info seminar 2021
Info seminar 2021Info seminar 2021
Info seminar 2021
 
Day 5
Day 5Day 5
Day 5
 
Day 3 take up convolutional neural network
Day 3  take up convolutional neural networkDay 3  take up convolutional neural network
Day 3 take up convolutional neural network
 
Day 1 wazz up ai
Day 1  wazz up aiDay 1  wazz up ai
Day 1 wazz up ai
 

Recently uploaded

result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
Tonystark477637
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 

Recently uploaded (20)

Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 

Day 2 build up your own neural network