A rule a person wrote, and a pile of examples
Show on a big screenTwo programs price the same crate at the mandi. The mandi is the wholesale fruit market. One follows a rule the shop wrote. One copies the nearest example from a pile of priced crates.
A crate has two numbers. One is marked fruit. One is weight in kilos. A marked fruit has a spot on its skin. Nearest means closest on those two numbers.
Loading lab…
- A new crate: 6 marked, 3 kilos.
- The shop rule counts marked fruit. 6 is 5 or more. Answer: cut price.
- The pile rule finds the nearest example. Its word: full price.
- On twenty test crates, the shop rule gets 15 right. The pile gets 14.
The rule
The pile is the evening's twenty-four priced crates. The test crates are the next morning's twenty, the kept-back set.
One rule a person wrote and one rule learned from examples. Measured on the same kept-back set, both produce a count. The counts do not tell you which crates each one got wrong.
- Shop rule — count marked fruit in a sample of fifteen. 5 or more means cut price. A sample is fifteen fruit taken from the crate.
- Pile rule — no formula. It copies the word on the nearest example.
The shop rule gets 15 of the 20 right. So 5 are wrong. The pile gets 14 of the 20 right, so 6 are wrong. Only 2 test crates are wrong under both rules. So the two rules miss mostly different crates.
Take one crate that both rules get wrong. At 4 marked and 1 kilo, the seller wrote cut price. The shop rule needs 5 or more marked. With 4, it says full. The nearest example on the pile has 5 marked and 2 kilos. Its word is full price, so the pile says full too.
Try the lab to finish this lesson.