introduction to machine learning for building design and
TRANSCRIPT
Join the conversation #AU2017Join the conversation #AU2017
Introduction to Machine Learning for Building Design and ConstructionMehdi Nourbakhsh, Ph.D.Sr. Research Scientist, Autodesk Researchmehdi.nourbakhsh [at] Autodesk.com
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:
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
ML Glossary
Model
Outlook
Temperature
Humidity
Windy
Construction
Input Output or label
F(Outlook, Temperature, Humidity, Windy) = Y
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
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?
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
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
Simplified ML process
In practice, this is not a straightforward process, there are lots of back and forth between the steps.
Exercise 3: Decision Tree
Follow this algorithm:• Divide into subsets• Are they pure? (all
‘yes’ or ‘no’)• Yes->done• No-> repeat
Exercise 3: Decision Tree9 Yes / 4 No
Follow this algorithm :• Divide into subsets• Are they pure? (all
‘yes’ or ‘no’)• Yes->done• No-> repeat
Exercise 3: Decision Tree9 Yes / 4 No
Follow this algorithm :• Divide into subsets• Are they pure? (all
‘yes’ or ‘no’)• Yes->done• No-> repeat
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
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 ?
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 ?
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
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 ?
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
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.5MAE
Input(X)
Output
(Y)* W=1.3Our Neural Net model:
Let’s see if we can do better:
Exercise 4: Construction Cost Model
X Y* W + b
Y = W*x + b
input outputweight bias
Exercise 4: Construction Cost Model
W/b -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70
1 177 167 157 147 137 127 117 107 97 87 77 67 57 53 50
1.1 142 132 122 112 102 92 82 72 62 52 42 42 45 48 52
1.2 107 97 87 77 67 57 47 37 33 37 40 43 47 50 53
1.3 72 62 52 42 35 32 28 32 35 38 42 45 48 58 68
1.4 37 33 30 27 23 27 30 33 43 53 63 73 83 93 103
1.5 25 22 18 28 38 48 58 68 78 88 98 108 118 128 138
1.6 33 43 53 63 73 83 93 103 113 123 133 143 153 163 173
1.7 68 78 88 98 108 118 128 138 148 158 168 178 188 198 208
1.8 103 113 123 133 143 153 163 173 183 193 203 213 223 233 243
1.9 138 148 158 168 178 188 198 208 218 228 238 248 258 268 278
2 173 183 193 203 213 223 233 243 253 263 273 283 293 303 313
?
Y=2x-70
Y=x Y=x+70
Y=2x+70
Y=x-70
What is the mean absolute error of these models?
Exercise 4: Construction Cost Model
W/b -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70
1 177 167 157 147 137 127 117 107 97 87 77 67 57 53 50
1.1 142 132 122 112 102 92 82 72 62 52 42 42 45 48 52
1.2 107 97 87 77 67 57 47 37 33 37 40 43 47 50 53
1.3 72 62 52 42 35 32 28 32 35 38 42 45 48 58 68
1.4 37 33 30 27 23 27 30 33 43 53 63 73 83 93 103
1.5 25 22 18 28 38 48 58 68 78 88 98 108 118 128 138
1.6 33 43 53 63 73 83 93 103 113 123 133 143 153 163 173
1.7 68 78 88 98 108 118 128 138 148 158 168 178 188 198 208
1.8 103 113 123 133 143 153 163 173 183 193 203 213 223 233 243
1.9 138 148 158 168 178 188 198 208 218 228 238 248 258 268 278
2 173 183 193 203 213 223 233 243 253 263 273 283 293 303 313
What model is better?
W/b -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70
1 177 167 157 147 137 127 117 107 97 87 77 67 57 53 50
1.1 142 132 122 112 102 92 82 72 62 52 42 42 45 48 52
1.2 107 97 87 77 67 57 47 37 33 37 40 43 47 50 53
1.3 72 62 52 42 35 32 28 32 35 38 42 45 48 58 68
1.4 37 33 30 27 23 27 30 33 43 53 63 73 83 93 103
1.5 25 22 18 28 38 48 58 68 78 88 98 108 118 128 138
1.6 33 43 53 63 73 83 93 103 113 123 133 143 153 163 173
1.7 68 78 88 98 108 118 128 138 148 158 168 178 188 198 208
1.8 103 113 123 133 143 153 163 173 183 193 203 213 223 233 243
1.9 138 148 158 168 178 188 198 208 218 228 238 248 258 268 278
2 173 183 193 203 213 223 233 243 253 263 273 283 293 303 313
Exercise 4: Construction Cost Model
X Y* W + b
Y = 1.5*x -50
input outputweight bias
Congratulation! You have trained your first neural network model!!!
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
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 ?
ML Algorithms: Artificial Neural Network
X1
f
*W1
+ b
X2 *W2
f = W1x1+ W2x2 + b
T(f)
Weighted sum of input
Activation function
YPredicted value
Exercise 5:
X1
f
*W1
+ b
X2 *W2
f = W1x1+ W2x2 + b
T(f) Y ?
What is the predicted value (Y) if:X1=0.2 , X2= -0.3W1=0.5, W2=0.5b= 0.1
Exercise 5:
X1
f
*W1
+ b
X2 *W2
f = W1x1+ W2x2 + b = 0.2*0.5-0.3*0.5+0.1=0.05T(f)=T(0.05) = 1
T(f) Y ?
What is the predicted value if:X1=0.2 , X2= -0.3W1=0.5, W2=0.5b= 0.1
ML Algorithms: Artificial Neural Network
Now, let’s talk about a group of neurons working together.
X1
f
*W1
+ b
X2*W
2
T(f) Y
X1
f
*W1
+ b
X2*W
2
T(f) Y
X1
f
*W1
+ b
X2*W
2
T(f) Y
X1
f
*W1
+ b
X2*W
2
T(f) Y
X1
f
*W1
+ b
X2*W
2
T(f) Y
X1
f
*W1
+ b
X2*W
2
T(f) Y
X1
f
*W1
+ b
X2*W
2
T(f) Y
X1
f
*W1
+ b
X2*W
2
T(f) Y
X1
f
*W1
+ b
X2*W
2
T(f) Y
X1
f
*W1
+ b
X2*W
2
T(f) Y
X1
f
*W1
+ b
X2*W
2
T(f) Y
X1
f
*W1
+ b
X2*W
2
T(f) Y
X1
f
*W1
+ b
X2*W
2
T(f) Y
X1
f
*W1
+ b
X2*W
2
T(f) Y
X1
f
*W1
+ b
X2*W
2
T(f) Y
X1
f
*W1
+ b
X2*W
2
T(f) Y
X1
f
*W1
+ b
X2*W
2
T(f) Y
X1
f
*W1
+ b
X2*W
2
T(f) Y
X1
f
*W1
+ b
X2*W
2
T(f) Y
X1
f
*W1
+ b
X2*W
2
T(f) Y
X1
f
*W1
+ b
X2*W
2
T(f) Y
Hmmm… looks very messy. Let’s come up with a shorter from of a neuron.
ML Algorithms: Short form of a neuron
n
X1
T(F=∑(XiWi+b))
*W1
b
X2 *W2
��� layer
Neuron at this layer
What are the repetitive tasks that you do in your everyday job and ML can help
you to automate?
Exercise 5
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
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
Wrap up
What is AI/ML?
History of ML
Application of ML
ML Glossary
ML Types
ML Process
ML Algorithms
Wrap up
What is AI/ML?
History of ML
Application of ML
ML Glossary
ML Types
ML Process
ML Algorithms
Wrap up
What is AI/ML?
History of ML
Application of ML
ML Glossary
ML Types
ML Process
ML Algorithms
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) = Y
Wrap up
What is AI/ML?
History of ML
Application of ML
ML Glossary
ML Types
ML Process
ML Algorithms
Wrap up
What is AI/ML?
History of ML
Application of ML
ML Glossary
ML Types
ML Process
ML Algorithms
Wrap up
What is AI/ML?
History of ML
Application of ML
ML Glossary
ML Types
ML Process
ML Algorithms
Decision Tree
Neural Network
Wrap up
What is AI/ML?
History of ML
Application of ML
ML Glossary
ML Types
ML Process
ML Algorithms
Decision Tree
Neural Network
Autodesk and the Autodesk logo are registered trademarks or trademarks of Autodesk, Inc., and/or its subsidiaries and/or affiliates in the USA and/or other countries. All other brand names, product names, or trademarks belong to their respective holders. Autodesk reserves the right to alter product and services offerings, and specifications and pricing at any time without notice, and is not responsible for typographical or graphical errors that may appear in this document.
© 2017 Autodesk. All rights reserved.