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

#SportTypePlaceLevelDayc(x)
1footballteamoutdoornationalSaturday+ 1
2hockeyteamoutdoornationalSaturday+ 1
3gymnasticsindividualindoorworldSaturday− 0
4handballteamindoornationalSaturday+ 1
5decathlonindividualoutdoorworldSunday− 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

  1. 1Initialise G to {⟨?, …, ?⟩}
  2. 2Initialise S to {⟨∅, …, ∅⟩}
  3. 3If xᵢ is a positive example
  4. 4remove from G every g that does not cover xᵢ
  5. 5for each s ∈ S that does not cover xᵢ
  6. 6remove s from S
  7. 7add every minimal generalisation h of s covering xᵢ with some g ∈ G, g ⪰ h
  8. 8remove from S every hypothesis more general than another of S
  9. 9If xᵢ is a negative example
  10. 10remove from S every s that covers xᵢ
  11. 11for each g ∈ G that covers xᵢ
  12. 12remove g from G
  13. 13add every minimal specialisation h of g rejecting xᵢ with some s ∈ S, h ⪰ s
  14. 14remove from G every hypothesis more specific than another of G