Learning a unified classifier incrementally via rebalancing