Result is correct.

Todo:
During balance_partitions, if number of records in leftover bucket is less than k, bucket with mini information gain will be merge to leftover bucket.
But this kind of merge may sacrifice huge information loss. Becasue sometimes small groups in leftover will cause large group be assigned to leftover.

I think partition is not so stupid. But I still need time to figue out this problem.