-
Notifications
You must be signed in to change notification settings - Fork 73
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
error 'ValueError: sample larger than populatio' running BPR() model #11
Comments
BTW, running the example provided with the testfm sourcecode (https://github.com/grafos-ml/test.fm/blob/master/src/testfm/examples/models_example.py), with the dataset data/movielenshead.dat there are some errors as well, with some of the models, Additionally, could anybody confirm whats exactly the output values [0.2877098548938246] returned by the models, what that means? Where can I found this information? ----------- (python 2.7) test1: sep="::", header=None, names=["user", "item", "rating", "date", "title"]) **0:00:00.142133 Random [0.2877098548938246] 0:00:19.330961 BPR (dim=10,iter=15,reg=0.0001,eta=0.001) [0.2886932217273792]** /home/sysadmin/.local/lib/python2.7/site-packages/testfm-1.0-py2.7-linux-x86_64.egg/testfm/models/content_based.py:110: FutureWarning: iget(i) is deprecated. Please use .iloc[i] or .iat[i] 0:00:01.142259 TF/IDF [0.22061728516487217] |
HI all,
I've run libfm in Ubuntu using the dataset detailed below,
Random model run OK,
however when I tried the rest of the models in my list (I followed the models_example.py example provided here), i.e. BPR, TFIDFModel, Popularity, TensorCoFi, ..., an error "ValueError: sample larger than population" is always triggered with every model.
Please, does anyone know what could be the source of this problem? any suggestion?
There are many entries in Internet related with this problem in python, but the answers and potential causes described I think doesn't apply this case, so is unclear for me.
Btw, the dataset size is bigger than 5K rows...
Thanks in advance,
regards,
R.
------------------ test:
Traceback (most recent call last):
File "modeltest2.py", line 57, in
print evaluator.evaluate_model(m, testing, all_items=items,)
File "build/bdist.linux-x86_64/egg/testfm/evaluation/evaluator.py", line 83, in evaluate_model
File "build/bdist.linux-x86_64/egg/testfm/evaluation/evaluator.py", line 30, in partial_measure
File "/usr/lib/python2.7/random.py", line 321, in sample
raise ValueError("sample larger than population")
ValueError: sample larger than population
The text was updated successfully, but these errors were encountered: