Professional Documents
Culture Documents
NETWORKS
CAR SALES
PREDICTION
PROBLEM
STATEMENT &
REGRESSION
BASICS
PROJECT OVERVIEW
You are working as a car salesman and you would like to develop a model to predict the total dollar
amount that customers are willing to pay given the following attributes:
• Customer Name
• Customer e-mail
• Country
• Gender
• Age
• Annual Salary REGRESSION TASK!
• Credit Card Debt
• Net Worth
ANNUAL SALARY
5
REGRESSION MATH!
• Goal is to obtain a relationship (model) between the Annual salary and car purchasing amount.
MODEL! (GOAL)
CAR PURCHASING AMOUNT
𝑦 =𝑏+𝑚 ∗ 𝑥
$2K
6
HOW ARE WE GOING TO USE THE MODEL?
• Once the coefficients ‘m’ and ‘b’ are obtained, you have obtained a regression model!
• This “trained” model can be later used to predict car purchase amount (dollars) based on the annual salary.
𝒀 y = mX + b
DEPENDANT INDEPENDANT
VARIABLE VARIABLE
𝒎
𝒃
X
𝑿
REGRESSION QUIZ
𝒚
𝒚
𝒙 𝒙
ADDITIONAL READING MATERIAL
• The brain has over 100 billion neurons communicating through electrical and chemical signals.
• Neurons communicate with each other and help us see, think, and generate ideas.
• Human brain learns by creating connections among these neurons.
• ANNs are information processing models inspired by the human brain.
X1 W1
W2
X2 S f y
W3
b
X3
1
Update
Error
• The neuron collects signals from input channels named dendrites, processes information in its nucleus,
and then generates an output in a long thin branch called axon.
X1
W1
W2
X2 NEURON
W3
DENDRITES X3
AXON
NUCLEAS
NEURON MATHEMATICAL MODEL
𝑊2
INPUTS/INDEPENDENT
VARIABLES 𝑿𝟐 F
𝑊3
𝑿𝟑 𝑦 = 𝑓 ( 𝑋 1 𝑊 1+ 𝑋 2 𝑊 2 + 𝑋 3 𝑊 3 +𝑏)
SINGLE NEURON MODEL IN ACTION
• Let’s assume that the activation function is a Unit Step Activation Function.
• The activation functions is used to map the input between (0, 1).
𝑏=0
Input #1=1 𝑿𝟏 =0.7
𝑊 2 =0.1
Input #2=3
𝑿𝟐 F
𝑊 3 =0.3
Input #3=4
𝑿𝟑
SINGLE NEURON MODEL IN ACTION
• Backpropagation is a method used to train ANNs by calculating gradient needed to update network
weights.
• It is commonly used by the gradient descent optimization algorithm to adjust the weight of neurons by
calculating the gradient of the loss function.
STEP 1: FORWARD PROPAGATION
STEP 2: ERROR
CALCULATION
STEP 4: WEIGHT UPDATE
STEP 2: ERROR
CALCULATION
STEP 4: WEIGHT UPDATE
STEP 2: ERROR
CALCULATION
STEP 4: WEIGHT UPDATE
W12
W11 W12 W13 b1
W P2
W21 W22 W23 W22 1
n2
b W13 S f a2
b 1 P1 W1
b2 P3
W23 n22
b
a2
W2
a f (W P b) P2 ∑ 1
f
W3
P3
b1
a 2 f ( P1W1 P2W2 P3W3 b 2)
24
MULTI-LAYER PERCEPTRON MODEL: MATRIX
REPRESENTATION
P1
P
P 2
PN1 Node (n+1, i) representation
[ ]
𝑊 11 𝑊 12 𝑊1,𝑁
⋯ 1 Non-Linear Sigmoid Activation function
𝑊 21 𝑊 22 𝑊2,𝑁 1
1
𝜑 ( 𝑤 )= −𝑤
⋮ ⋱ ⋮ 1 +𝑒
𝑊 𝑚 −1,1 𝑊 𝑚 −1,2 𝑊 𝑚− 1, 𝑁
⋯ 1
𝑊 𝑚 ,1 𝑊 𝑚 ,2 𝑊 𝑚, 𝑁 1
25