All problems

How Trustworthy Is a Single Holdout Score?

mediumPythonModel Validation

Halewood Analytics is deciding how much to trust a model that was judged on a single holdout — one slice of the data set aside and scored once. To find out, the same model was graded again by cross-validation, which scores it once per fold and returns one accuracy per fold. If those fold scores sit far apart, the single holdout number could have landed anywhere between them, and the fact that it landed where it did says as much about which rows were held out as about the model.

Task: Print how far apart the fold scores are, and whether that makes a single holdout number trustworthy.

Input

The first line holds one integer k, the number of folds. The second line holds k fold accuracies separated by single spaces.

Output

Two lines. First range, a space, and the distance between the highest and lowest fold scores, rounded to 4 decimal places. Then one word: stable when that distance is strictly under 0.05, unstable otherwise. A distance of exactly 0.05 counts as unstable.

Example:

Input:
4
0.80 0.82 0.79 0.81

Output:
range 0.0300
stable

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…