Skip to content

Bug of Normalisation #10

Description

@Linnore

Multi-GNN/data_loading.py

Lines 108 to 127 in 252b025

#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.

Activity

  1. AlessioBoetti commented on Dec 19, 2024

    @AlessioBoetti

    Agree. I'd like to add to this that when using Reverse MP, inside the create_hetero_obj function the edge_attr relative to the ports are swapped for the reverse edge, but this doesn't take into account the use of timedeltas, which if used together with the ports add other two columns, so the latest two columns are no more relative to the ports but relative to the timedeltas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions