Open danielegrattarola opened 7 years ago
What is the input data for bpr.py code?? can u provide a sample input
sampling 9993 <user,item i,item j> triples...
initial loss = 5242.5237869
starting iteration 0
Traceback (most recent call last):
File "testTopK.py", line 303, in
Same problem, Any ideas?
Hi, please try this to fix try: z = 1.0/(1.0+exp(x)) except OverflowError: z = float('inf')
I met the same problem, and I tune the learning rate smaller to resolve the math range error
Hello, I'm trying to use you code to learn and predict on a binary sparse matrix (meaning I only have 1s in the matrix), but during the training phase it will crash and throw this error:
Traceback (most recent call last): File "bpr.py", line 260, in <module> model.train(data,sampler,num_iters) File "bpr.py", line 52, in train self.update_factors(u,i,j) File "bpr.py", line 81, in update_factors z = 1.0/(1.0+exp(x)) OverflowError: math range error
I've checked to see who's guilty of this, and apparently the x variable of the fucntion is diverging, therefore causing the
exp
operator to overflow. Have you encountered this issue? Can you suggest a fix?Thanks