throw error if class probs dont sum to 1