I'm not sure if we need this line: if a class has no training instance, we can't learn anything about it anyway and it will never be predicted at test time.