MAS.py: implementation of the MAS algorithmTAS.py: implementation of TAS algorithmmain.ipynb: Sample notebook demonstrating execution of TAS and MAS to get the embeddings
Please refer to main.ipynb to check the execution process. We have provided the code to execute MAS (implemented in MAS.py) and TAS (implemented in TAS.py).
Please provide the data as a pickle file in the below format:
[g,
[train_X, train_Y],
[val_X, val_Y],
[test_X, test_Y]]
As a sanity check, plese ensure that the pickle file can be loaded using the code below:
with open(DATA_PATH, "rb") as f:
(
g,
[train_X, train_y],
[val_X, val_y],
[test_X, test_y],
) = pickle.load(f)Here,
gis anetworkx.classes.graph.Graphobject containing the graphtrain_X,val_Xandtest_Xare lists containing train, val and test splits respectively. Every element of the list represents the node ID of a node in the respective splittrain_Y,val_Yandtest_Yare lists containing the node labels for the respective splits.