Kaimaoge / IGNNK

110 stars 29 forks source link

HELP, There are errors when running the `kpmf.py` in baselines folder #7

Open YN-ST opened 1 year ago

YN-ST commented 1 year ago

When I directly run the kpmf.py file in the baselines, I faced these errors as following.

  1. one error like following

    ERROR 1 Traceback (most recent call last): File "kpmf.py", line 187, in U, V, RMSE,time = kpmf_sgd(trainSet, mask_train, D, K_u_inv, K_v_inv, sigma_r, eta, valSet, mask_val) File "kpmf.py", line 120, in kpmf_sgd diag_K_v_inv_V=np.multiply(np.diag(K_v_inv),V) ValueError: operands could not be broadcast together with shapes (1500,) (1500,1000)

  2. After I tried to fix ERROR 1, another error showed up.

    ERROR 2 Traceback (most recent call last): File "kpmf.py", line 187, in U, V, RMSE,time = kpmf_sgd(trainSet, mask_train, D, K_u_inv, K_v_inv, sigma_r, eta, valSet, mask_val) File "kpmf.py", line 123, in kpmf_sgd gd_u=-2/(sigma_r*2)(np.multiply ValueError: operands could not be broadcast together with shapes (1,3990) (399,1000)

I am feeling helpless here, could you please fix the errors after you uploaded the baseline files. Thanks you so much. 🙏