Returns a sample transaction dataset. >>> load_data() [['milk'], ['milk', 'butter'], ['milk', 'bread'], ['milk', 'bread', 'chips']]
()
| 16 | |
| 17 | |
| 18 | def load_data() -> list[list[str]]: |
| 19 | """ |
| 20 | Returns a sample transaction dataset. |
| 21 | |
| 22 | >>> load_data() |
| 23 | [['milk'], ['milk', 'butter'], ['milk', 'bread'], ['milk', 'bread', 'chips']] |
| 24 | """ |
| 25 | return [["milk"], ["milk", "butter"], ["milk", "bread"], ["milk", "bread", "chips"]] |
| 26 | |
| 27 | |
| 28 | def prune(itemset: list, candidates: list, length: int) -> list: |