Sport
Which sports events are concepts of interest? 3 positive and 2 negative examples, 5 categorical attributes. The final version space has 6 hypotheses.
0 / 32
Training examples
5 examples · processed in this order
| # | Sport | Type | Place | Level | Day | c(x) |
|---|---|---|---|---|---|---|
| 1 | football | team | outdoor | national | Saturday | + 1 |
| 2 | hockey | team | outdoor | national | Saturday | + 1 |
| 3 | gymnastics | individual | indoor | world | Saturday | − 0 |
| 4 | handball | team | indoor | national | Saturday | + 1 |
| 5 | decathlon | individual | outdoor | world | Sunday | − 0 |
Step 0Initialisation
Initialise
G starts with the most general hypothesis (everything is positive) and S with the most specific one (nothing is positive). Every hypothesis of H lies between them, so the version space is the whole of H.
Variables
- G
- { ⟨?, ?, ?, ?, ?⟩ }
- S
- { ⟨∅, ∅, ∅, ∅, ∅⟩ }
Boundary view · 1297 hypothesesThe version space has 1297 hypotheses (more than 120): only the boundaries are drawn.|VS| = 1,297
G (most general)S (most specific)inside VS⊤ / ⊥ outside VSmore general (intermediates hidden)
Boundary history
S₀ … Sₙ and G₀ … Gₙ. Select an example to compare the state before and after it.
G₀⟨?, ?, ?, ?, ?⟩
S₀⟨∅, ∅, ∅, ∅, ∅⟩
+
G₁⟨?, ?, ?, ?, ?⟩
S₁⟨football, team, outdoor, national, Saturday⟩
S generalised
+
G₂⟨?, ?, ?, ?, ?⟩
S₂⟨?, team, outdoor, national, Saturday⟩
S generalised
−
G₃⟨?, team, ?, ?, ?⟩⟨?, ?, outdoor, ?, ?⟩⟨?, ?, ?, national, ?⟩
S₃⟨?, team, outdoor, national, Saturday⟩
G specialised
+
G₄⟨?, team, ?, ?, ?⟩⟨?, ?, ?, national, ?⟩
S₄⟨?, team, ?, national, Saturday⟩
G removedS generalised
−
G₅⟨?, team, ?, ?, ?⟩⟨?, ?, ?, national, ?⟩
S₅⟨?, team, ?, national, Saturday⟩
no change
Boundaries
After example 0
G₀ · most general|G| = 1
S₀ · most specific|S| = 1
Candidate Elimination
Course pseudocode, slide 74
- 1Initialise G to {⟨?, …, ?⟩}
- 2Initialise S to {⟨∅, …, ∅⟩}
- 3If xᵢ is a positive example
- 4remove from G every g that does not cover xᵢ
- 5for each s ∈ S that does not cover xᵢ
- 6remove s from S
- 7add every minimal generalisation h of s covering xᵢ with some g ∈ G, g ⪰ h
- 8remove from S every hypothesis more general than another of S
- 9If xᵢ is a negative example
- 10remove from S every s that covers xᵢ
- 11for each g ∈ G that covers xᵢ
- 12remove g from G
- 13add every minimal specialisation h of g rejecting xᵢ with some s ∈ S, h ⪰ s
- 14remove from G every hypothesis more specific than another of G