Skip to content

Commit 4f0fbad

Browse files
committed
Add adaboost markdown.
1 parent b059d97 commit 4f0fbad

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ The file [aima3e-algorithms.pdf](https://github.com/aimacode/pseudocode/blob/mas
7676
| • | | [CROSS-VALIDATION-WRAPPER](md/Cross-Validation-Wrapper.md) |
7777
| • | | [DECISION-LIST-LEARNING](md/Decision-List-Learning.md) |
7878
| • | | [BACK-PROP-LEARNING](md/Back-Prop-Learning.md) |
79-
| • | | |
79+
| • | | [ADABOOST](md/AdaBoost.md) |
8080
|<hr/>|<hr/>|<hr/>|
8181
| &bull; | | [CURRENT-BEST-LEARNING](md/Current-Best-Learning.md) |
8282
| &bull; | | [VERSION-SPACE-LEARNING](md/Version-Space-Learning.md) |

md/AdaBoost.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# ADABOOST
2+
3+
## AIMA3e
4+
__function__ ADABOOST(_examples_, _L_, _K_) __returns__ a weighted\-majority hypothesis
5+
&emsp;__inputs__: _examples_, set of _N_ labeled examples (_x<sub>1</sub>_, _y<sub>1</sub>_),&hellip;,(_x<sub>N</sub>_,_y<sub>N</sub>_)
6+
&emsp;&emsp;&emsp;&emsp;_L_, a learning algorithm
7+
&emsp;&emsp;&emsp;&emsp;_K_, the number of hypotheses in the ensemble
8+
&emsp;__local variables__: __w__, a vector of _N_ example weights, initially 1 &frasl; _N_
9+
&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;__h__, a vector of _K_ hypotheses
10+
&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;__z__, a vector of _K_ hypothesis weights
11+
12+
&emsp;__for__ _k_ = 1 __to__ _K_ __do__
13+
&emsp;&emsp;&emsp;__h__\[_k_\] &larr; _L_(_examples_, __w__)
14+
&emsp;&emsp;&emsp;_error_ &larr; 0
15+
&emsp;&emsp;&emsp;__for__ _j_ = 1 __to__ _N_ __do__
16+
&emsp;&emsp;&emsp;&emsp;&emsp;__if__ __h__\[_k_\](_x<sub>j</sub>_) &ne; _y<sub>j</sub>_ __then__ _error_ &larr; _error_ &plus; __w__\[_j_\]
17+
&emsp;&emsp;&emsp;__for__ _j_ = 1 __to__ _N_ __do__
18+
&emsp;&emsp;&emsp;&emsp;&emsp;__if__ __h__\[_k_\](_x<sub>j</sub>_) = _y<sub>j</sub>_ __then__ __w__\[_j_\] &larr; __w__\[_j_\] &middot; _error_ &frasl; (1 &minus; _error_)
19+
&emsp;&emsp;&emsp;__w__ &larr; NORMALIZE(__w__)
20+
&emsp;&emsp;&emsp;__Z__\[_k_\] &larr; log(1 &minus; _error_) &frasl; _error_
21+
&emsp; __return__ WEIGHTED\-MAJORITY(__h__, __z__)
22+
23+
---
24+
__Figure ??__ The ADABOOST variant of the boosting method for ensemble learning. The algorithm generates hypothesis by successively reweighting the training examples. The function WEIGHTED\-MAJORITY generates a hypothesis that returns the output value with the highest vote from the hypotheses in __h__, with votes weighted by __z__.

0 commit comments

Comments
 (0)