W W W W X X X: Machine Age 5 Years Operating Temperature 60°C Vibration Level 10 Mm/s
W W W W X X X: Machine Age 5 Years Operating Temperature 60°C Vibration Level 10 Mm/s
[a] Predicting Time to Failure Using the Trained Linear Regression Model
Given:
Coefficients:
w0 = 50
w1 = −3
w2 = −0.5
w3 = −0.02
Time to Failure = w0 + w1 x1 + w2 x2 + w3 x3
Step-by-Step Calculation:
1. Compute the Contribution of Each Feature:
Machine Age Contribution:
w1 x1 = (−3) × 5 = −15
w2 x2 = (−0.5) × 60 = −30
w3 x3 = (−0.02) × 10 = −0.2
Answer:
[b] Calculating the Partial Derivative of the Cost Function with Respect to w1
https://chatgpt.com/c/66f9eccd-6fe8-800e-95ae-f1014c8f2289 1/4
9/30/24, 5:48 AM ChatGPT
1 5 60 10 110
2 8 75 15 80
3 3 50 8 130
Coefficients:
w0 = 50
w1 = −3
w2 = −0.5
w3 = −0.02
Where:
N = Number of instances = 3
y^i = Predicted time to failure for instance i
Objective:
∂J
Find ∂w1 .
For Machine 1:
Features:
x11 = 5
x21 = 60
x31 = 10
For Machine 2:
Features:
x12 = 8
x22 = 75
x32 = 15
https://chatgpt.com/c/66f9eccd-6fe8-800e-95ae-f1014c8f2289 2/4
9/30/24, 5:48 AM ChatGPT
For Machine 3:
Features:
x13 = 3
x23 = 50
x33 = 8
Step 2: Compute the Error Term (yi − y^i ) for Each Instance
For Machine 1:
For Machine 2:
For Machine 3:
For Machine 1:
For Machine 2:
For Machine 3:
i=1
∂J
Step 5: Compute the Partial Derivative ∂w
1
https://chatgpt.com/c/66f9eccd-6fe8-800e-95ae-f1014c8f2289 3/4
9/30/24, 5:48 AM ChatGPT
N
∂J 1
= − ∑ (yi − y^i )x1i
∂w1 N i=1
∂J 1
= − × 1602.88 = −534.2933
∂w1 3
Answer:
The partial derivative of the cost function with respect to w1 is approximately −534.29.
Final Summary:
[a] Using the trained linear regression model, the predicted time to failure for the machine
is 4.8 months.
∂J
[b] The calculated partial derivative ∂w is −534.29, indicating the direction and magnitude by
1
https://chatgpt.com/c/66f9eccd-6fe8-800e-95ae-f1014c8f2289 4/4