Advertisement
Guest User

key_prob

a guest
May 14th, 2018
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. def key_prob(dataset):
  2.     return {uniqueelem:[rows[-1] \
  3.                 for rows in dataset].count(uniqueelem)/len(dataset) \
  4.                 for uniqueelem in {rows[-1] for rows in dataset}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement