MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / load_data

Function load_data

machine_learning/apriori_algorithm.py:18–25  ·  view source on GitHub ↗

Returns a sample transaction dataset. >>> load_data() [['milk'], ['milk', 'butter'], ['milk', 'bread'], ['milk', 'bread', 'chips']]

()

Source from the content-addressed store, hash-verified

16
17
18def 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
28def prune(itemset: list, candidates: list, length: int) -> list:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected