The in-out parameter controls how node2vec random walks explore a graph. Higher values bias walks toward nearby nodes, approximating breadth-first search; lower values send walks farther outward, approximating depth-first search. section 9.3.2
Breadth-first-style walks capture local structure and structural roles, while depth-first-style walks tend to produce community- or homophily-based embeddings. In Neo4j Graph Data Science, the parameter appears as inOutFactor. section 9.3.2 section 9.3.3
Choosing 0.5 for shared-audience streams
For an undirected graph of streams connected by shared audiences, setting inOutFactor to 0.5 encourages depth-first walks and embeddings that emphasize how closely streams are connected. section 9.3.3
Listing 9.7 Calculating node2vec embeddings and storing them to the database
data = run_query("""
CALL gds.beta.node2vec.write('twitch',
{embeddingDimension:8, relationshipWeightProperty:'weight',
inOutFactor:0.5, writeProperty:'node2vec'})
""")
This listing shows the inOutFactor setting alongside embedding dimension, relationship weights, and the output property in a node2vec write operation. section 9.3.3
