0% found this document useful (0 votes)
2K views4 pages

W W W W X X X: Machine Age 5 Years Operating Temperature 60°C Vibration Level 10 Mm/s

Uploaded by

jackoggyduniya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views4 pages

W W W W X X X: Machine Age 5 Years Operating Temperature 60°C Vibration Level 10 Mm/s

Uploaded by

jackoggyduniya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

9/30/24, 5:48 AM ChatGPT

[a] Predicting Time to Failure Using the Trained Linear Regression Model

Given:
Coefficients:
w0 = 50

w1 = −3

w2 = −0.5

w3 = −0.02

Features of the Machine:


Machine Age (x1 ) = 5 years

Operating Temperature (x2 ) = 60°C ​

Vibration Level (x3 ) = 10 mm/s


Linear Regression Model Equation:

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
​ ​

Operating Temperature Contribution:

w2 x2 = (−0.5) × 60 = −30
​ ​

Vibration Level Contribution:

w3 x3 = (−0.02) × 10 = −0.2
​ ​

2. Sum All Contributions Along with the Intercept:

Time to Failure = 50 + (−15) + (−30) + (−0.2) = 50 − 15 − 30 − 0.2 = 4.8

Answer:

The predicted time to failure of the machine is 4.8 months.

[b] Calculating the Partial Derivative of the Cost Function with Respect to w1 ​

Given Dataset (Table II):

https://chatgpt.com/c/66f9eccd-6fe8-800e-95ae-f1014c8f2289 1/4
9/30/24, 5:48 AM ChatGPT

Machine Age (x1i )


​ Operating Temp (x2i ) ​ Vibration Level (x3i )​ Actual Time to Failure (yi )

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​

Cost Function J(w) Using Mean Squared Error (MSE):


N
1
J(w) = ∑ (yi − y^i )2
2N i=1
​ ​ ​ ​ ​

Where:
N = Number of instances = 3
y^i = Predicted time to failure for instance i
​ ​

Objective:

∂J
Find ∂w1 . ​

Step 1: Compute Predicted Values y^i for Each Instance ​ ​

For Machine 1:
Features:
x11 = 5

x21 = 60

x31 = 10

Predicted Time to Failure y^1 : ​ ​

y^1 = 50 + (−3)(5) + (−0.5)(60) + (−0.02)(10) = 50 − 15 − 30 − 0.2 = 4.8


​ ​

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

Predicted Time to Failure y^2 : ​ ​

y^2 = 50 + (−3)(8) + (−0.5)(75) + (−0.02)(15) = 50 − 24 − 37.5 − 0.3 = −11.8


​ ​

For Machine 3:
Features:
x13 = 3 ​

x23 = 50 ​

x33 = 8 ​

Predicted Time to Failure y^3 : ​ ​

y^3 = 50 + (−3)(3) + (−0.5)(50) + (−0.02)(8) = 50 − 9 − 25 − 0.16 = 15.84


​ ​

Step 2: Compute the Error Term (yi ​ − y^i ) for Each Instance ​ ​

For Machine 1:

y1 − y^1 = 110 − 4.8 = 105.2


​ ​ ​

For Machine 2:

y2 − y^2 = 80 − (−11.8) = 80 + 11.8 = 91.8


​ ​ ​

For Machine 3:

y3 − y^3 = 130 − 15.84 = 114.16


​ ​ ​

Step 3: Compute (yi ​ − y^i ) × x1i for Each Instance


​ ​ ​

For Machine 1:

(y1 − y^1 ) × x11 = 105.2 × 5 = 526


​ ​ ​ ​

For Machine 2:

(y2 − y^2 ) × x12 = 91.8 × 8 = 734.4


​ ​ ​ ​

For Machine 3:

(y3 − y^3 ) × x13 = 114.16 × 3 = 342.48


​ ​ ​ ​

Step 4: Sum the Products


3
∑ (yi − y^i ) × x1i = 526 + 734.4 + 342.48 = 1602.88
​ ​ ​ ​ ​

i=1

∂J
Step 5: Compute the Partial Derivative ∂w ​

1 ​

The gradient of the cost function with respect to w1 is given by: ​

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
​ ​ ​ ​ ​ ​ ​

Plugging in the values:

∂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 ​

which w1 should be adjusted to minimize the cost function


https://chatgpt.com/c/66f9eccd-6fe8-800e-95ae-f1014c8f2289 4/4

You might also like