Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

ASCE International Conference on

Computing in Civil Engineering 2023

Estimating Output Variance of a Regressing Monjurul Hasan, and Ming Lu, Ph.D.
Tree Model: Case Study of Concrete Civil and Environmental Engineering
Strength Prediction University of Alberta, Canada

1
Classification: Protected A
Problem Background What is
What is the uncertainty
reasoning behind associated with
this output? this output

Model

Input Output
Black BOX
A point value
prediction

2
Classification: Protected A
Research Problem
• Need a machine learning model that
can explain the reasoning behind the
decision.

• Need the estimate the uncertainty


associate with the prediction.

3
Classification: Protected A
Regression Problem

Not a good fit for


Regression: nonlinear input-
• Widely used machine output relationship
learning model.
• Easy to interpret Regression line

y
• Input – output relationship
is explained by the slope
(β) of a linear equation

x
4
Classification: Protected A
Model Tree
Classify the dataset using x
Model Tree
interpretable binary rules. x > x1 Structure
x

x1 x x1 < x x2 x > x2
Branch 1 Branch 2 Branch 3 Regression line
Regression line
1 2 3
y y

Transformation by
Model Tree
Application

0 x1 x2
x x
(a) Regular regression (b) Model tree in connection
analysis with regression 5
Classification: Protected A
Enhanced Model Tree

6
Classification: Protected A
Variance Analysis Model
𝑦 = 𝐹 𝑥𝑖 = 𝛽0 + 𝛽1 𝑥1 + 𝛽2 𝑥2 , … … , +𝛽𝑛 𝑥𝑛 𝑦 1 = 𝛽01 + 𝛽11 𝑥 𝑦 1 = 1.0 + 2.1𝑥
Variance analysis model for MLR equations 𝑦 2 = 𝛽02 + 𝛽12 𝑥 𝑦 2 = 1.6 + 1.9𝑥
Estimating 𝛽 𝑦 3 = 𝛽03 + 𝛽13 𝑥
𝑦 3 = 1.7 + 2.2𝑥
.
.
.

𝑦 𝑛 = 𝛽0𝑛 + 𝛽1𝑛 𝑥 𝑦 𝑛 = 1.8 + 2.0𝑥


y
𝑦 = 𝛽0 𝜇0 , 𝜎0 + 𝛽1 𝜇1 , 𝜎1 × 𝑥 𝑦 = 𝛽0 1.7,0.11
+ 𝛽1 2.0,0.07 × 𝑥

For any MLR equation:


• 𝑦 = 𝐹 𝑥𝑖 = 𝛽0 + 𝛽1 𝑥1 + 𝛽2 𝑥2 , … … , +𝛽𝑛 𝑥𝑛
𝑥
• 𝐻𝑒𝑟𝑒, 𝛽0 , 𝛽1 , 𝛽2 … … , 𝛽𝑛 =
𝜇0 , 𝜎0 , 𝜇1 , 𝜎1 , 𝜇2 , 𝜎2 , … … , 𝜇𝑛 , 𝜎𝑛

7
Classification: Protected A
Variance Analysis Model (cntd…)

Error Propagation Theorem Application: 𝜕𝐹 𝜕𝐹 𝜕𝐹


𝐽𝑥𝑦 = …
The propagation of random error in a system 𝜕𝛽1 𝜕𝛽2 𝜕𝛽i
follows the law of propagation of variance and
covariance (POV)
𝑣𝑎𝑟 𝛽0
𝑇
𝐶𝑦 = 𝐽𝑥𝑦 𝐶𝑥 𝐽𝑦𝑥 (2) 𝑣𝑎𝑟 𝛽1
𝐶𝑥 =

Here, 𝐶𝑦 is the covariance matrix of output y, and 𝑣𝑎𝑟 𝛽𝑖
𝐶𝑥 is the covariance matrix of input 𝑥
𝐽𝑥𝑦 is the Jacobian (Jacobian matrix) of the equation
relating 𝑥 to 𝑦
(Veregin 1995; Koch et al., 2010)

8
Classification: Protected A
Variance Analysis Model (cntd…)

𝑦 = 𝐹 𝑥𝑖 = 𝛽0 + 𝛽1 𝑥1 + 𝛽2 𝑥2 , … … , +𝛽𝑛 𝑥𝑛 (1)
2
𝑇 2 𝜕𝐹 2 𝜕𝐹 𝜕𝐹 2
𝐶𝑦 = 𝐽𝑥𝑦 𝐶𝑥 𝐽𝑦𝑥 = 𝜎𝑦 = 𝑣𝑎𝑟 𝛽0 + 𝑣𝑎𝑟 𝛽1 + 𝑣𝑎𝑟 𝛽2 + ⋯ (2)
𝜕𝛽0 𝜕𝐹𝛽1 𝜕𝛽2

For a set of given inputs 𝑥1 , 𝑥2 , …, 𝑥𝑛

Mean of the prediction y can be found by


plugging in the mean values of 𝛽 in Eq. 1

Variance of the prediction y, can be found by


plugging in the variances of 𝛽 in Eq. 2

9
Classification: Protected A
Enhanced Model Tree Model

Variance Analysis Enhanced Model


Model Tree
Model Tree

10
Classification: Protected A
Concrete Strength Prediction Case
ID Attribute
• The dataset was taken from the
X1 Cement (kg/m3)
University of California, Irvine,
X2 Blast furnace slag (kg/m3)
machine learning repository (UCI
2020) X3 Fly ash (kg/m3)
• 1030 instances with eight X4 Water (kg/m3)
attributes denoting high X5 Super Plasticizer (kg/m3)
performance concrete (HPC) X6 Coarse Aggregate (kg/m3)
X7 Fine Aggregate (kg/m3)
X8 Age (days)
Y Compressive Strength (MPa)

11
Classification: Protected A
Concrete Strength prediction Model
• Strength Prediction Model
Rule 1
𝑌𝑀
True False = 𝛽0,𝑀 𝜇0,𝑀 𝜎0,𝑀 + 𝛽1,𝑀 𝜇1,𝑀 𝜎1,𝑀 𝑋1,𝑀
Branch
Rule 2
+ ⋯ + 𝛽8,𝑀 𝜇8,𝑀 𝜎8,𝑀 𝑋8,𝑀
1

True False

Branch
2
Branch
3
• Variance Estimate Model
𝜎𝑇,𝑀 2
2 2
= 𝑋1,𝑀 𝑣𝑎𝑟 𝛽1,𝑀 + 𝑋2,𝑀 𝑣𝑎𝑟 𝛽2,𝑀
2
+ ⋯ + 𝑋8,𝑀 𝑣𝑎𝑟 𝛽8,𝑀

12
Classification: Protected A
Results
• Total 8 model tree rule branches are found for concrete strength
prediction model.
Rules and equations for 1st three branches
Branch Logic MLR Model
Branch X8≤21days Y1=(0.091, 0.004)X1+(0.055, 0.005)X2+(0.040,
1 0.008)X3-(0.109,0.022)X4+(0.376, 0.096)X5+(0.001,
0.003)X6-(0.001, 0.004)X7+(1.328, 0.08)X8
Branch X8>21days, and X1≤164.8 Y2=(0.026, 0.042)X1+(0.122, 0.008)X2+(0.05,
2 kg/m3 0.01)X3-(0.086,0.029)X4+(0.062, 0.146)X5+(0.003,
0.005)X6+(0.015, 0.005)X7+(0.069, 0.013)X8
Branch X8>21days, and 164.8 Y2=(0.112, 0.022)X1+(0.109, 0.014)X2+(0.063,
3 kg/m3<X1≤352.5 kg/m3, and 0.025)X3-(0.154,0.054)X4+(0.03, 0.027)X5+(0.017,
X4≤175.98 kg/m3 0.009)X6+(0.009, 0.008)X7+(0.168, 0.024)X8
13
Classification: Protected A
Model Performance

Figure: Model performance: (a) predicted concrete strength (b)


predicted variance of the concrete strength.
14
Classification: Protected A
Conclusion

x1 • A transparent model
x2
Y (point value prediction)
(interpretable by rule/s)
Enhanced
x3
Model Tree • Can capture nonlinear
σY (STD of the prediction) input-output relationship.
xn • Gives the variance of
Input Model Output
estimate of the prediction.

15
Classification: Protected A
Thanks!
If you have any questions or want to more
about the research, please email:

Monjurul Hasan (mdmonjur@ualberta.ca)


Dr. Ming Lu (mlu6@ualberta.ca)

16
Classification: Protected A

You might also like