wtl52656 / MM-STGED

6 stars 2 forks source link

build graph error #2

Open yingycl opened 3 months ago

yingycl commented 3 months ago

python build_graph.py

Traceback (most recent call last): File "/MM-STGED/build_graph.py", line 259, in G = build_global_POI_checkin_graph(dst_dir, new2raw_rid, raw_rn_dict, mbr, grid_size) File "/MM-STGED/build_graph.py", line 68, in build_global_POI_checkin_graph trajs = parser.parse(os.path.join(dst_dir, filename)) TypeError: parse() missing 1 required positional argument: 'id_dict'

wtl52656 commented 3 months ago

Thanks for your attention. We have updated the related code.

yingycl commented 3 months ago

Thanks for the quick reply. Now I encounter another problem. In multi_main.py line 226: road_condition = np.load(condition_file) # T, N, N for i in range(road_condition.shape[0]): maxn = road_condition[i].max() road_condition[i] = road_condition[i] / maxn

I got maxn = 0 in most cases. Therefore, road_condition contained many nan values and finally the program terminated unexpectedly at

Traceback (most recent call last): File "/MM-STGED/multi_main.py", line 340, in valid_rate_loss, valid_id_loss = evaluate(model, spatial_A_trans, road_condition, SE, valid_iterator, File "/MM-STGED/models/multi_train.py", line 201, in evaluate dis_mae_loss, dis_rmse_loss, dis_rn_mae_loss, dis_rn_rmse_loss = check_rn_dis_loss(output_seqs[1:], File "/MM-STGED/models/loss_fn.py", line 78, in check_rn_dis_loss convert_pre_rid = new2raw_rid_dict[pre_rid.tolist()]

wtl52656 commented 3 months ago

We only provide example data, so the calculated road conditions are incomplete, and many values are zero. We have provided the final flow.npy in ./data/Porto/extra_data. You can use it directly and skip the step for calculating road conditions.

yingycl commented 3 months ago

Problem solved. Thanks! I finished training on the example data, but the test accuracy is only 0.16. Is this because there is not enough training data? If so, where should I get the complete data?