A learning curve plots training and validation error as the training set grows. Its shape tells you what to do next:
Implement diagnose(train_errors, val_errors, target_error, gap_tol=0.1) using the last point of each curve:
"high_variance" if val - train > gap_tol"high_bias" if train > target_error"good_fit"Also implement still_improving(val_errors, window=3, min_delta=0.01): True if the mean of the last window validation errors is lower than the mean of the window before it by more than min_delta. Return False if there are fewer than 2 * window points.