You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all thank you for developing such an excellend library.
While predicting, I sometimes get Division by zero error depending on the input data for prediction. Moreover, it also gives this error verying the algorithm used for training.
Is there any condition under which it behaves like this which I'm missing? I'm attaching the error screenshot which might help in debugging.
Thank you
The text was updated successfully, but these errors were encountered:
from what I see in the picture I belive the error is on your end, on line 38 you are trying to divide $predValue = $sum / $freq
in the use case where $vectors[0] is empty, the loop will be skipped and the value of $freq in that case will be 0. so you need to check first the value of $freq before you divide.
Thanks for your reply. I'm sorry I think I am missing one important detail.
The code which is there in the screenshot is from the file phpjuice\opencf\src\Algorithms\Slopeone\Predictor.php . I have not written this code, I just called the getPrediction function.
First of all thank you for developing such an excellend library.
While predicting, I sometimes get
Division by zero
error depending on the input data for prediction. Moreover, it also gives this error verying the algorithm used for training.Is there any condition under which it behaves like this which I'm missing? I'm attaching the error screenshot which might help in debugging.
Thank you
The text was updated successfully, but these errors were encountered: