A feature set is a collection of graph relationships reserved for calculating network features in a link-prediction model. Keeping these relationships separate from training and test samples helps prevent feature leakage. section 10.6
Use the split to keep feature calculation independent from supervised evaluation:
- Reserve the feature relationships for calculating measures such as network distance, preferential attachment, or neighborhood overlap. section 10.6
- Use separate train and test relationships as classification samples; optionally add a validation set for hyperparameter optimization. section 10.2.2 section 10.6
Random relationship feature set
For the Twitch shared-audience network, randomly retain about 90% of matching Stream relationships as FEATURE_REL relationships. This provides a relationship set for calculating features when no time information is available. section 10.2.2
Listing 10.2 Constructing a relationship feature set
run_query("""
MATCH (s1:Stream)-[:SHARED_AUDIENCE]->(s2:Stream)
WITH s1, s2
WHERE rand() <= 0.9
MERGE (s1)-[:FEATURE_REL]->(s2);
""")
Shows a Neo4j query that constructs a relationship feature set by randomly selecting relationships and merging FEATURE_REL edges. section 10.2.2

