|
#Adding ports and time-deltas if applicable |
|
if args.ports: |
|
logging.info(f"Start: adding ports") |
|
tr_data.add_ports() |
|
val_data.add_ports() |
|
te_data.add_ports() |
|
logging.info(f"Done: adding ports") |
|
if args.tds: |
|
logging.info(f"Start: adding time-deltas") |
|
tr_data.add_time_deltas() |
|
val_data.add_time_deltas() |
|
te_data.add_time_deltas() |
|
logging.info(f"Done: adding time-deltas") |
|
|
|
#Normalize data |
|
tr_data.x = val_data.x = te_data.x = z_norm(tr_data.x) |
|
if not args.model == 'rgcn': |
|
tr_data.edge_attr, val_data.edge_attr, te_data.edge_attr = z_norm(tr_data.edge_attr), z_norm(val_data.edge_attr), z_norm(te_data.edge_attr) |
|
else: |
|
tr_data.edge_attr[:, :-1], val_data.edge_attr[:, :-1], te_data.edge_attr[:, :-1] = z_norm(tr_data.edge_attr[:, :-1]), z_norm(val_data.edge_attr[:, :-1]), z_norm(te_data.edge_attr[:, :-1]) |
The data normalisation in line 127 does not normalise the last edge attribute, which corresponds to "payment format" . This is a desired behaviour if no ports nor time deltas are added. However, when ports or time deltas are added, the last edge attribute would not be "payment format" anymore and required normalisation.
Multi-GNN/data_loading.py
Lines 108 to 127 in 252b025
The data normalisation in line 127 does not normalise the last edge attribute, which corresponds to "payment format" . This is a desired behaviour if no ports nor time deltas are added. However, when ports or time deltas are added, the last edge attribute would not be "payment format" anymore and required normalisation.