From 2d41a7c807a9f515649cce77c3268aab7f997a60 Mon Sep 17 00:00:00 2001 From: Wapiti Date: Mon, 21 Feb 2022 14:46:19 +0000 Subject: [PATCH] Update 01_Social_network_analysis.ipynb Should based on the whole Graph to generate the model: Have confirmed with the following experiment: Node2Vec for graph_train: - Precision: 0.9033816425120773 - Recall: 0.9091249065071054 - F1-Score: 0.9062441752096925 Node2Vec for G: - Precision: 0.9235116804822909 - Recall: 0.9166043380703066 - F1-Score: 0.920045045045045 --- Chapter06/01_Social_network_analysis.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chapter06/01_Social_network_analysis.ipynb b/Chapter06/01_Social_network_analysis.ipynb index 535a774..2455a71 100644 --- a/Chapter06/01_Social_network_analysis.ipynb +++ b/Chapter06/01_Social_network_analysis.ipynb @@ -1207,7 +1207,7 @@ "from node2vec.edges import HadamardEmbedder \n", "from stellargraph.data import EdgeSplitter \n", "\n", - "node2vec = Node2Vec(graph_train) \n", + "node2vec = Node2Vec(G) \n", "model = node2vec.fit() \n", "edges_embs = HadamardEmbedder(keyed_vectors=model.wv) \n", "train_embeddings = [edges_embs[str(x[0]),str(x[1])] for x in samples_train]\n",