All problems

Reading a Learning Curve

easyPythonModel Validation

Before Halewood Analytics pays to label another fifty thousand rows, it checks whether more rows would even help. The model is retrained at several training-set sizes and each run's error on a validation set is recorded, giving a curve of error against size. If that curve is still falling as the sets get bigger, buying more data is likely to buy accuracy. If it has flattened out, the money would be wasted and the fix has to come from somewhere else.

Task: Print whether the curve is still falling or has flattened out.

Input

The first line holds one integer n, the number of measurements. Each of the next n lines holds two numbers separated by a single space: the training-set size, then the validation error at that size. The lines arrive in increasing order of size.

Output

One line: improving if the validation error is lower at every measurement than at the one before it, plateaued otherwise. A step where the error holds level counts against it just as much as one where it rises.

Example:

Input:
4
100 0.4
200 0.3
400 0.25
800 0.22

Output:
improving

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…