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
I was trying to calculate the prediction value myself with the weight output by model and always got the wrong answer.
Then I realized that the bias value is always None, even if I set k0=True manually.
fm = pywFM.FM(task='regression', num_iter=5, k2=2, k0=True)
I don't know whether the wrong answer came from the absence of bias, but it seems strange that the global_bias is always None.
How can I fix it?
Or, is there any possibility I can calculate the prediction myself?
The text was updated successfully, but these errors were encountered:
I had the same issue, with both regression and classification.
Below is an MWE.
(I followed the installation for libfm, and installed the latest pywFM with #29 (comment))
importnumpyasnpimportpywFMx=np.array([
[0., 1.],
[1., 0.],
])
y=np.array([-1., 1.])
fm=pywFM.FM("regression", num_iter=10, k0=True, seed=1)
model=fm.run(x, y, x, y) # using the same data for simplicityprint(model.predictions, model.global_bias)
# output: [-0.429961, 0.264456] None
Not sure if the issue is due to temp files.
Thanks in advance!
I was trying to calculate the prediction value myself with the weight output by model and always got the wrong answer.
Then I realized that the bias value is always None, even if I set k0=True manually.
fm = pywFM.FM(task='regression', num_iter=5, k2=2, k0=True)
I don't know whether the wrong answer came from the absence of bias, but it seems strange that the global_bias is always None.
How can I fix it?
Or, is there any possibility I can calculate the prediction myself?
The text was updated successfully, but these errors were encountered: