FOSSIL: Regret-minimizing weighting for robust learning under imbalance and small data