3

Maximum Entropy

Unsolved
Active Learning

Difficulty: 4 | Problem written by peter.washington
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:
<class 'list'>
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:
<class 'int'>
1

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Quibusdam rem ducimus qui quod vero quo ullam atque, quos in doloribus eveniet placeat blanditiis exercitationem laboriosam enim?

Assumenda impedit sapiente rerum labore voluptates molestias, doloribus saepe minima blanditiis rem ad nisi delectus, dolor consectetur deserunt aperiam corrupti nobis dolorem, nam placeat nostrum.

Incidunt dolor libero temporibus quaerat aut deleniti nulla similique perferendis, neque officiis cum asperiores similique exercitationem veritatis dolor nihil animi laborum, necessitatibus quia provident ipsam dolorem non.

This is a premium feature.
To access this and other such features, click on upgrade below.

Ready.

Input Test Case

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