Skip to content

Instantly share code, notes, and snippets.

@Killavus
Last active January 28, 2016 22:50
Show Gist options
  • Save Killavus/bbb26c9b2f4e1e6988c0 to your computer and use it in GitHub Desktop.
Save Killavus/bbb26c9b2f4e1e6988c0 to your computer and use it in GitHub Desktop.
from collections import Counter
for label in set(group_labels):
train_mask = group_labels == label
real_labels = train_labels[train_mask]
pos_stat = Counter(real_labels).values()
# pos_stat is info about quantity of each label - as a list of quantities
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment