Convert y to dense array, otherwise MLP.mean_of_targets breaks.