Skip to content

Instantly share code, notes, and snippets.

@venik
Last active July 24, 2019 21:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save venik/012896ac1d90932e5b55404883d204d7 to your computer and use it in GitHub Desktop.
Save venik/012896ac1d90932e5b55404883d204d7 to your computer and use it in GitHub Desktop.
Question 1
https://raw.githubusercontent.com/jameslafa/mining-massive-datasets/master/Week%202%20-%20Frequent%20Itemsets.ipynb
arr = [(20000, 60000000), (20000, 80000000), (100000, 40000000), (100000, 100000000)]
hash = lambda n, m: (1000000 + m*3) * 4
triangular = lambda n, m: (1000000 + (n**2) / 2.0) * 4
[triangular(v[0], v[1]) for v in arr]
[hash(v[0], v[1]) for v in arr]
Question 2
Below the support level: {BP}:1, {PM}:1
Question 3
ss = lambda s: s**2 / 48000000
https://www.cnblogs.com/Answer1215/p/4027903.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment