Professional Documents
Culture Documents
2 Optimisation-based algorithms
4 Rule-based algorithms
2 Optimisation-based algorithms
4 Rule-based algorithms
2 Optimisation-based algorithms
4 Rule-based algorithms
2 Optimisation-based algorithms
4 Rule-based algorithms
Introduction
Apple or an orange?
Multiplication tables
• Let’s say you want to build a model that can predict the
result of any multiplication table.
Nb1 nb2 Result
2 2 4
2 3 6
2 4 8
2 5 10
2 7 14
2 8 16
3 1 3
3 3 9
3 4 12
3 6 18
3 7 21
3 9 27
..... .... ...
3 5 ?
Multiplication tables
Multiplication
2 Optimisation-based algorithms
4 Rule-based algorithms
2 Optimisation-based algorithms
4 Rule-based algorithms
Decision Tree
Decision Tree
• Given several characteristics, the decision starts with one of
these characteristics and moves to another, and so on until
arriving at the final decision (the label of the corresponding
class).
Decision tree
Algorithm ID3
X
H(S) = − P(Ci )log2 (P(Ci )) (1)
ci∈C
X
IG (S, fj ) = H(S) − P(fj v )H(fj v ) (2)
fj v ∈fj
Decision tree
Decision Tree
Attribut Outlook
Attribut Outlook
2 Optimisation-based algorithms
4 Rule-based algorithms
Linear regression
Linear regression
Linear regression
Finding Bi
Fit line
Make prediction
• For a given new height, we can find the weight using the
previous equation.
• For example, if height = 66 than the weight is
Weight = −208.24 + 5.38 ∗ 66 = 146.84
2 Optimisation-based algorithms
4 Rule-based algorithms
2 Optimisation-based algorithms
4 Rule-based algorithms