Ejemplo n.º 1
0
def support(itemset):
	count = 0
	users = Users.getUserIDs()
	userCount = len(users)
	for user in users:
		missing = False
		for item in itemset:
			if Users.userLikes(user, item):
				missing = missing
			else:
				missing = True
		if not missing:
			count = count + 1
	#print str(count/userCount)
	#print str(count)	
	return count / userCount