You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am going over the documentation of the Cora Link Prediction and I want to know on how to add
"dummy" edge features to the existing model.
Currently I am doing the following :
cora_cites = pd.read_csv(
cora_cites_file,
sep="\t", # tab-separated
header=None, # no heading row
names=["target", "source"], # set our own names for the columns
)
# Dummy features.
cora_cites["v1"] = 1
cora_cites["v2"] = 2
cora_feature_names = [f"w{i}" for i in range(1433)]
cora_raw_content = pd.read_csv(
cora_content_file,
sep="\t", # tab-separated
header=None, # no heading row
names=["id", *cora_feature_names, "subject"], # set our own names for the columns
)
cora_raw_content
## Stellar Graph requirtes our nodes to be the index of the pd dataframe
cora_content_str_subject = cora_raw_content.set_index("id")
cora_content_str_subject
## Dropping subject since we are not caring for it?
cora_content_no_subject = cora_content_str_subject.drop(columns="subject")
cora_content_no_subject
cora_no_subject = StellarGraph({"paper": cora_content_no_subject}, {"cites": cora_cites})
print(cora_no_subject.info())
G = cora_no_subject
# ML Training Code is kept the same as example shown in the link below
Note, I have Checked the model summary and from above the only difference I see is that I dropped the subject one note encoding and thus I will have 1433 features vs 1440 as in the original.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I am going over the documentation of the Cora Link Prediction and I want to know on how to add
"dummy" edge features to the existing model.
Currently I am doing the following :
How will I know if the model provided here https://stellargraph.readthedocs.io/en/stable/demos/link-prediction/gcn-link-prediction.html is picking up these dummy edge features? Is there another layer I need to add so that the edge dummy features get used?
Note, I have Checked the model summary and from above the only difference I see is that I dropped the subject one note encoding and thus I will have 1433 features vs 1440 as in the original.
Beta Was this translation helpful? Give feedback.
All reactions