LearnPy Hub
← Machine Learning: scikit-learn problems
Hard

Pick the Best k

Using the starter's iris split, try every k in the input list. Print the k with the highest test accuracy (if several tie, the smallest k) and its accuracy with 3 decimals.

Input

One line of distinct integers: the values of k to try.

Output

The best k and its accuracy, separated by a space.

Sample 1

Input
1 3 5 7
Output
3 0.974

Sample 2

Input
7 15 1
Output
1 0.947
solution.py
Output appears here
Hints
Pick the Best k · Python practice problem · LearnPy Hub