Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def create_system(number_labels=3, measures=100):
- """Create a syntetic experiment"""
- labels = np.arange(number_labels)
- # Create a vector with the real and computed labels
- real = np.random.choice(labels, size=measures)
- computed = np.random.choice(labels, size=measures)
- accumulator = {(i, j): 0 for i in number_labels for j in number_labels}
- for x, y in np.nditer((real, computed)):
- if (x == y):
- accumulator[(x, y)] += 1
- return accumulator
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement