chenxiaowei-vincent / XGraphBoost

56 stars 15 forks source link

NameError: name 'get_scores' is not defined #3

Open lqli-100 opened 3 years ago

lqli-100 commented 3 years ago

Hello, I'm studying your work recently, I have got the result of GCN+rf+knn+svm, then I add # to the last term "if name ==" main ":" of gcn_xgb_morgan.py, remove the # of "if name ==" main" in front of it, but the code has the following error. Could you please help me deal with this? Thank you very much. Traceback (most recent call last): File "gcn_xgb_morgan_xgboost.py", line 279, in gcn_scores,xgb_gcn,gcn_morgan,morgan_scores = get_scores(gcn_scores,xgb_gcn,gcn_morgan,morgan_scores,args) NameError: name 'get_scores' is not defined.

chenxiaowei-vincent commented 3 years ago

You can add get_scores to "from gcn_model.gcn_xgboost_scores import get_feature" at the beginning of gcn_xgb_morgan.py, Change to "from gcn_model.gcn_xgboost_scores import get_feature, get_scores"

lqli-100 commented 3 years ago

You can add get_scores to "from gcn_model.gcn_xgboost_scores import get_feature" at the beginning of gcn_xgb_morgan.py, Change to "from gcn_model.gcn_xgboost_scores import get_feature, get_scores"

Got it.Thanks.

lqli-100 commented 3 years ago

gcn_xgb_morgan.py Hello, I added “from gcn_model.gcn_xgboost_scores import get_feature, get_scores" at the beginning of gcn_xgb_morgan.py according to your suggestion. However, the code reported the following error again, I did not solve the problem according to the error report, I hope you can help me to solve it, thank you very much. File "gcn_xgb_morgan_xgboost.py", line 275, in gcn_scores,xgb_gcn,gcn_morgan,morgan_scores = get_scores(gcn_scores,xgb_gcn,gcn_morgan,morgan_scores,args) File "F:\xgraphboost\XGraphBoost-main\gcn_ggnn_xgboost\gcn_model\gcn_xgboost_scores.py", line 120, in get_scores xgb_train_feature = get_feature(names['model' + str(i) ], train_loader_xgb, args.device) File "F:\xgraphboost\XGraphBoost-main\gcn_ggnn_xgboost\gcn_model\gcn_xgboost_scores.py", line 22, in get_feature feature, A, y = k ValueError: too many values to unpack (expected 3)

chenxiaowei-vincent commented 3 years ago

Hello,I can't answer this question immediately. I need to run the code again and tell you the solution after debug.