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 using edge prediction evaluation and LogisticRegressionCVEdgePrediction for my graph, which has the following:
print(f"Number of edges in graph: {len(graph.get_edge_node_ids(directed=False))}")
Number of edges in graph: 4541
print(f"Number of nodes in graph: {len(graph.get_node_ids())}")
Number of nodes in graph: 1875.
However, when I run edge prediction evaluation: results = edge_prediction_evaluation(
holdouts_kwargs=dict(train_size=0.8),
graphs=graph,
models=LogisticRegressionCVEdgePrediction(max_iter=500),
number_of_holdouts=1,
node_features=model
)
where model = Node2VecSkipGramEnsmallen(embedding_size=EMBEDDING_SIZE,walk_length = WALK_LENGTH,return_weight = RETURN_WEIGHT, explore_weight=EXPLORE_WEIGHT, iterations=NUM_WALKS).fit_transform(graph)
I find that the results report:
nodes_number: 1875
edges_number: 9082
I was wondering why the prediction is reporting double the number of edges than are actually present in the graph? Thanks!
The text was updated successfully, but these errors were encountered:
You are most likely predicting an undirected graph, which is a graph where interactions go in both directions. So it is providing the prediction in both directions.
Hi!
I am using edge prediction evaluation and LogisticRegressionCVEdgePrediction for my graph, which has the following:
print(f"Number of edges in graph: {len(graph.get_edge_node_ids(directed=False))}")
Number of edges in graph: 4541
print(f"Number of nodes in graph: {len(graph.get_node_ids())}")
Number of nodes in graph: 1875.
However, when I run edge prediction evaluation:
results = edge_prediction_evaluation(
holdouts_kwargs=dict(train_size=0.8),
graphs=graph,
models=LogisticRegressionCVEdgePrediction(max_iter=500),
number_of_holdouts=1,
node_features=model
)
where model = Node2VecSkipGramEnsmallen(embedding_size=EMBEDDING_SIZE,walk_length = WALK_LENGTH,return_weight = RETURN_WEIGHT, explore_weight=EXPLORE_WEIGHT, iterations=NUM_WALKS).fit_transform(graph)
I find that the results report:
nodes_number: 1875
edges_number: 9082
I was wondering why the prediction is reporting double the number of edges than are actually present in the graph? Thanks!
The text was updated successfully, but these errors were encountered: