-
-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: Sample larger than population or is negative #38
Comments
It happens when possible output (output from predict function) is less than top_n (select best n element). Can you share your input (e.g. text = ?)? |
One of the questions was You might be able to regenerate the issue using the following code:
|
I also meet the error,have you solved it? |
Fixed and merged to master branch (Not ready in pip install yet) |
I did not use pip ,directly put your folders in my project |
How is the result after using the latest build? |
ValueError Traceback (most recent call last) in eda_text(text) in aug_text(text) /home/user5/Desktop/bert_fot_new/nlpaug/base_augmenter.py in augment(self, data) /home/user5/Desktop/bert_fot_new/nlpaug/augmenter/word/bert.py in insert(self, data) /home/user5/Desktop/bert_fot_new/nlpaug/base_augmenter.py in sample(cls, x, num) /usr/local/anaconda3/lib/python3.7/random.py in sample(self, population, k) ValueError: Sample larger than population or is negative |
I think should change sample to choice |
Hi,
I have a small dataset that I am trying to augment. For some of the questions, I am getting the following error:
After some research, I came across this https://stackoverflow.com/questions/20861497/sample-larger-than-population-in-random-sample-python
but I am still not sure what exactly the issue is. It works sometimes but other times it returns this error. Is it something to do with my questions? Is there a specific format I need to follow for the questions?
Any help would be much appreciated.
The text was updated successfully, but these errors were encountered: