throws error if you try to have no training data