1. Join the conversation #AU2017
Join the conversation #AU2017
Introduction to Machine Learning for Building Design
and Construction
Mehdi Nourbakhsh, Ph.D.
Sr. Research Scientist, Autodesk Research
mehdi.nourbakhsh [at] Autodesk.com
2. What is AI/ML?
History of ML
Application of ML in AEC
ML Glossary
ML Types
ML Process
ML Algorithms
Decision Tree
Artificial Neural Network
Wrap up
Contents:
7. Data, sample
Variables, attributes, features
Feature vector
Input, output
ML Glossary
outlook temperature humidity windy construction
Day 1 overcast hot high FALSE yes
Day 2 rainy cool normal TRUE yes
Day 3 sunny mild high FALSE no
11. A1 A2 A3 Y
1 0.2 Yes 0.32
5 0.56 No 0.58
2 0.56 Yes 0.23
3 0.6 Yes 0.39
Exercise 1
In the following example, what is/are:
• Samples
• Features
• Input
• output
16. A1 A2 A3 Y
1 0.2 Yes 0.32
5 0.56 No 0.58
2 0.56 Yes 0.23
3 0.6 Yes 0.39
Exercise 1.5
Is this a supervised or unsupervised learning?
Is this a classification or regression problem?
17. Donten in a company that has more than 10,000 building models in their
database. These models are either residential, office space, or warehouses.
They want to categorize their models into these three groups and seek your
recommendation as a thought-leader in the industry. Which one do you
recommend?
Hiring 20 people to manually open all of the models and categorize them in 10
months?
Using machine learning to automatically categorize the models in a month?
(why does it take a month?)
Exercise 2
18. Which type of ML is this?
How should we describe this
problem to the machine?
Data?
Features?
Input, output?
Exercise 2
Model
?
?
…
?
?
Input Output
Residential Warehouse Office
19. Simplified ML process
In practice, this is not a straightforward process, there are lots of
back and forth between the steps.
22. Exercise 3: Decision Tree
Follow this algorithm:
• Divide into subsets
• Are they pure? (all
‘yes’ or ‘no’)
• Yes->done
• No-> repeat
23. Exercise 3: Decision Tree 9 Yes / 4 No
Follow this algorithm :
• Divide into subsets
• Are they pure? (all
‘yes’ or ‘no’)
• Yes->done
• No-> repeat
24. Exercise 3: Decision Tree 9 Yes / 4 No
Follow this algorithm :
• Divide into subsets
• Are they pure? (all
‘yes’ or ‘no’)
• Yes->done
• No-> repeat
32. ML Algorithms: Artificial Neural Network
Source: https://www.intechopen.com/source/html/39067/media/image1.png
A) human neuron;
B) artificial neuron;
C) biological synapse;
D) ANN synapses
33. A construction company completed three projects. The estimated and actual
construction cost of each project is presented in the following table. Your task
is to design a cost model for the company based on the available data and
predict how much is the actual cost of ‘proj 4’.
Exercise 4: Construction Cost Model
Estimated Construction Cost Actual Construction Cost
proj 1 350 420
proj 2 200 250
proj 3 500 700
Proj 4 400 ?
34. A construction company completed three projects. The estimated and actual
construction cost of each project is presented in the following table. Your task is
to design a cost model for the company based on the available data.
Exercise 4: Construction Cost Model
Input
(X)
Output
(Y)
* W
Estimated Construction Cost Actual Construction Cost
proj 1 350 420
proj 2 200 250
proj 3 500 700
Proj 4 400 ?
35. One way of doing it:
A= Sum all estimated costs
B = Sum all actual costs
W = B/A
Exercise 4: Construction Cost Model
Estimated Construction Cost Actual Construction Cost
proj 1 350 420
proj 2 200 250
proj 3 500 700
Sum 1050 1370
B/A 1.30
Is it good? Why not 1.5 or 2.0?
Y=1.30X
36. Measure of goodness = less error
What is the error of the model?
Exercise 4: Construction Cost Model
Estimated Construction Cost Actual Construction Cost Predicted Cost (y=1.3x) Error
proj 1 350 420 455 ?
proj 2 200 250 260 ?
proj 3 500 700 650 ?
37. Exercise 4: Construction Cost Model
Absolute error = | predicted cost – actual cost |
Estimated Construction Cost Actual Construction Cost Predicted Cost (y=1.3x) Error
proj 1 350 420 455 -35
proj 2 200 250 260 -10
proj 3 500 700 650 50
We don’t like negative error
Mean absolute error (MAE) = ∑| predicted cost – actual cost | / no of samples
What is the mean absolute error of the model? 31.67
absolute
38. Let’s try other Ws:
Exercise 4: Construction Cost Model
Estimated Construction Cost Actual Construction Cost y=1.3x y=1.4x y=1.5x
proj 1 350 420 455 588 682.5
proj 2 200 250 260 350 390
proj 3 500 700 650 980 975
31.67 182.67 47.5
MAE
Input
(X)
Output
(Y)
* W=1.3
Our Neural Net model:
39. Let’s see if we can do better:
Exercise 4: Construction Cost Model
X Y
* W + b
Y = W*x + b
input output
weight bias
43. Exercise 4: Construction Cost Model
Y = 1.5*x -50
Estimated Construction Cost Actual Construction Cost
proj 1 350 420
proj 2 200 250
proj 3 500 700
Proj 4 400 ?
Y = 1.5*400 -50
= 550 answer
44. ML Algorithms: Artificial Neural Network
X1
Y
*W1
+ b
X2 *W2
Y = W1x1+ W2x2 + b
Estimated Construction Cost Average temperature Actual Construction Cost
proj 1 350 62 420
proj 2 200 55 250
proj 3 500 85 700
Proj 4 400 53 ?
45. ML Algorithms: Artificial Neural Network
X1
f
*W1
+ b
X2 *W2
f = W1x1+ W2x2 + b
T(f)
Weighted
sum of
input
Activation
function
Ŷ
Predicted
value
46. Exercise 5:
X1
f
*W1
+ b
X2 *W2
f = W1x1+ W2x2 + b
T(f) Ŷ ?
What is the predicted value (Ŷ) if:
X1=0.2 , X2= -0.3
W1=0.5, W2=0.5
b= 0.1
47. Exercise 5:
X1
f
*W1
+ b
X2 *W2
f = W1x1+ W2x2 + b = 0.2*0.5-0.3*0.5+0.1=0.05
T(f)=T(0.05) = 1
T(f) Ŷ ?
What is the predicted value if:
X1=0.2 , X2= -0.3
W1=0.5, W2=0.5
b= 0.1
49. ML Algorithms: Artificial Neural Network
Now, let’s talk about a group of neurons working together.
X1
f
*W
1
+ b
X2
*W
2
T(f) Ŷ
X1
f
*W
1
+ b
X2
*W
2
T(f) Ŷ
X1
f
*W
1
+ b
X2
*W
2
T(f) Ŷ
X1
f
*W
1
+ b
X2
*W
2
T(f) Ŷ
X1
f
*W
1
+ b
X2
*W
2
T(f) Ŷ
X1
f
*W
1
+ b
X2
*W
2
T(f) Ŷ
X1
f
*W
1
+ b
X2
*W
2
T(f) Ŷ
X1
f
*W
1
+ b
X2
*W
2
T(f) Ŷ
X1
f
*W
1
+ b
X2
*W
2
T(f) Ŷ
X1
f
*W
1
+ b
X2
*W
2
T(f) Ŷ
X1
f
*W
1
+ b
X2
*W
2
T(f) Ŷ
X1
f
*W
1
+ b
X2
*W
2
T(f) Ŷ
X1
f
*W
1
+ b
X2
*W
2
T(f) Ŷ
X1
f
*W
1
+ b
X2
*W
2
T(f) Ŷ
X1
f
*W
1
+ b
X2
*W
2
T(f) Ŷ
X1
f
*W
1
+ b
X2
*W
2
T(f) Ŷ
X1
f
*W
1
+ b
X2
*W
2
T(f) Ŷ
X1
f
*W
1
+ b
X2
*W
2
T(f) Ŷ
X1
f
*W
1
+ b
X2
*W
2
T(f) Ŷ
X1
f
*W
1
+ b
X2
*W
2
T(f) Ŷ
X1
f
*W
1
+ b
X2
*W
2
T(f) Ŷ
Hmmm… looks very messy. Let’s come up with a shorter from
of a neuron.
50. ML Algorithms: Shorter form of a neuron
X1
T(F=∑(XiWi+b))
*W1
b
X2 *W2
X1
f
*W1
+ b
X2 *W2
T(f) Ŷ
51. ML Algorithms: Short form of a neuron
n
X1
T(F=∑(XiWi+b))
*W1
b
X2 *W2
layer
Neuron at this layer
59. What are the repetitive tasks that you do in your everyday job and ML can help
you to automate?
Exercise 5
60. What are the problems that you have no idea how to solve or things that you
have no idea how to do, and ML can help you to do or resolve it?
Exercise 5
61. Imaging you have a personal assistant agent that is like a trusted collaborator: it
can brainstorm with you, it can do research for you, it can tell if your idea
doesn’t work because of this and that, it can fill in the role of other parties (if
you are an architect, it can provide you with the knowledge of engineering or
construction). What are the things that you want your assistant to do for you.
Exercise 5
62. Wrap up
What is AI/ML?
History of ML
Application of ML
ML Glossary
ML Types
ML Process
ML Algorithms
63. Wrap up
What is AI/ML?
History of ML
Application of ML
ML Glossary
ML Types
ML Process
ML Algorithms
64. Wrap up
What is AI/ML?
History of ML
Application of ML
ML Glossary
ML Types
ML Process
ML Algorithms
65. Wrap up
What is AI/ML?
History of ML
Application of ML
ML Glossary
ML Types
ML Process
ML Algorithms
Model
Outlook
Temperature
Humidity
Windy
Construction
Input Output or label
F(Outlook, Temperature, Humidity, Windy) = Ŷ
66. Wrap up
What is AI/ML?
History of ML
Application of ML
ML Glossary
ML Types
ML Process
ML Algorithms
67. Wrap up
What is AI/ML?
History of ML
Application of ML
ML Glossary
ML Types
ML Process
ML Algorithms
68. Wrap up
What is AI/ML?
History of ML
Application of ML
ML Glossary
ML Types
ML Process
ML Algorithms
Decision Tree
Neural Network
69. Wrap up
What is AI/ML?
History of ML
Application of ML
ML Glossary
ML Types
ML Process
ML Algorithms
Decision Tree
Neural Network