Closed suibian1213 closed 1 year ago
I'm sorry, the codes in this repo can only suit yamanishi_08. The codes for others are finished by my teammates. I'll ask them for the codes, please wait.
Thank you very much. The work of your team is great. My email address is 1806083537@qq.com, and I look forward to your codes.
Hello, I have a few questions about the KGE_NFM model. Have you ever run this code with datasets other than yamanishi_08 (such as BioKG, hetionet, luo's_dataset or other unmentioned datasets )? Now,I'm trying to run the kge_nfm.py code using the BioKG dataset, but I have encountered the following problems in the process of changing the dataset. I would be happy to provide more details. Could you have a look at your convenience? Thank you.
Traceback (most recent call last): File "kge_nfm.py", line 366, in
roc,pr,roc_s,pr_s,re_train_all,train_label,re_test_all,test_label,pred_y = train(i,10,10,50,200,True,10)
File "kge_nfm.py", line 314, in train
train_dense_features,test_dense_features = get_scaled_embeddings(model,re_train_all,re_test_all,False,n_components)
File "kge_nfm.py", line 168, in get_scaled_embeddings
[train_obj_embeddings,test_obj_embeddings] = [model.get_embeddings(x['tail'].values, embedding_type='entity') for x in [train_triples,test_triples]]
File "kge_nfm.py", line 168, in
[train_obj_embeddings,test_obj_embeddings] = [model.get_embeddings(x['tail'].values, embedding_type='entity') for x in [train_triples,test_triples]]
File "/home/zwc/anaconda3/envs/kge_nfm/lib/python3.6/site-packages/ampligraph/latent_features/models/EmbeddingModel.py", line 444, in get_embeddings
idxs = np.vectorize(lookup_dict.get)(entities)
File "/home/zwc/anaconda3/envs/kge_nfm/lib/python3.6/site-packages/numpy/lib/function_base.py", line 2108, in call
return self._vectorize_call(func=func, args=vargs)
File "/home/zwc/anaconda3/envs/kge_nfm/lib/python3.6/site-packages/numpy/lib/function_base.py", line 2195, in _vectorize_call
res = array(outputs, copy=False, subok=True, dtype=otypes[0])
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'