3

Maximum Entropy

Unsolved

Active Learning

Difficulty: 4 | Problem written by peterwashington

Problem reported in interviews at

Amazon
Apple
Facebook
Google
Netflix

Maximum entropy is a common metric for active learning. In each test case for this problem, you will be given a list of numpy arrays representing probability distributions. Your job is to calculate the index of the probability distribution with the maximum entropy. (If the first numpy array represents the distribution with the maximum entropy, then return 0; if the second numpy array represents the distribution with the maximum entropy, then return 1; etc).

Sample Input:
probability_distributions: [array([0.1 , 0.5 , 0.1 , 0.15, 0.15]), array([0.2, 0.2, 0.2, 0.2, 0.2])]

Expected Output:
1

Input Test Case

Please enter only one test case at a time
numpy has been already imported as np (import numpy as np)

Output