I'm not completely happy with such a complex return value but it is required to satisfy all requirements of `grid_search`, `learning_curve` and `cross_val_score`.