1

Hypermarameter Tuning

Unsolved
Fundamentals

Difficulty: 3 | Problem written by peter.washington
Problem reported in interviews at

Amazon
Apple
Facebook
Google
Netflix

Given the dataset below, find the value of k, between k_start and k_end (inclusive) for which a k-nearest neighbors classifier trained on the training data will result in the highest accuracy on the testing data.

Note: this problem may take up to a few minutes to execute.

Sample Input:
<class 'int'>
k_start: 1
<class 'int'>
k_end: 10

Expected Output:
<class 'int'>
3

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.

Omnis nihil laborum ab eum non praesentium facere et nesciunt quod, autem aperiam ipsa temporibus itaque quae mollitia a, temporibus explicabo exercitationem a iusto pariatur omnis vel nihil dolorem quidem, non perferendis inventore.

Maiores sint commodi, voluptatum repudiandae dolor expedita iste ratione? Mollitia eveniet cupiditate fuga laborum labore repudiandae eos.

Consequatur explicabo autem optio ratione dolore, velit soluta qui officia ex sint distinctio consequatur nostrum totam, neque itaque officiis id fuga quia suscipit architecto quo, quis ut tenetur incidunt eligendi sit aut tempora laudantium. Earum voluptatibus quia labore exercitationem neque, dignissimos assumenda delectus voluptatem dicta nihil illum dolorem, aspernatur perferendis consequuntur placeat excepturi suscipit distinctio dolorum totam ea beatae. Provident deserunt distinctio expedita dolorum ipsum minima laborum veritatis aliquid voluptates.

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)