Skip to content

Commit 5aaec92

Browse files
committed
adds current best learning
1 parent 18b050e commit 5aaec92

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

md/Current-Best-Learning.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# CURRENT-BEST-LEARNING
2+
3+
## AIMA3e
4+
__function__ Current-Best-Learning(_examples_, _h_) __returns__ a hypothesis or fail
5+
 __if__ _examples_ is empty __then__
6+
   __return__ _h_
7+
 _e_ ← First(_examples_)
8+
 __if__ _e_ is consistent with _h_ __then__
9+
   __return__ Current-Best-Learning(Rest(_examples_), _h_)
10+
 __else if__ _e_ is a false positive for _h_ __then__
11+
   __for each__ _h'_ __in__ specializations of _h_ consistent with _examples_ seen so far __do__
12+
     _h''_ ← Current-Best-Learning(Rest(_examples_), _h'_)
13+
     __if__ _h''_ ≠ _fail_ __then return__ _h''_
14+
 __else if__ _e_ is a false negative for _h_ __then__
15+
   __for each__ _h'_ __in__ generalizations of _h_ consistent with _examples_ seen so far __do__
16+
     _h''_ ← Current-Best-Learning(Rest(_examples_), _h'_)
17+
     __if__ _h''_ ≠ _fail_ __then return__ _h''_
18+
 __return__ _fail_
19+
20+
---
21+
__Figure ??__ The current-best-hypothesis learning algorithm. It searches for a consistent hypothesis that fits all the examples and backtracks when no consistent specialization/generalization can be found. To start the algorithm, any hypothesis can be passed in; it will be specialized or generalized as needed.

0 commit comments

Comments
 (0)