|
45 | 45 | "- [Complete guide to understanding Node2Vec algorithm](https://towardsdatascience.com/complete-guide-to-understanding-node2vec-algorithm-4e9a35e5d147)" |
46 | 46 | ] |
47 | 47 | }, |
| 48 | + { |
| 49 | + "cell_type": "code", |
| 50 | + "execution_count": null, |
| 51 | + "id": "43204131", |
| 52 | + "metadata": {}, |
| 53 | + "outputs": [], |
| 54 | + "source": [ |
| 55 | + "%%html\n", |
| 56 | + "<style>\n", |
| 57 | + "/* CSS style for smaller dataframe tables. */\n", |
| 58 | + ".dataframe th {\n", |
| 59 | + " font-size: 8px;\n", |
| 60 | + "}\n", |
| 61 | + ".dataframe td {\n", |
| 62 | + " font-size: 8px;\n", |
| 63 | + "}\n", |
| 64 | + "</style>" |
| 65 | + ] |
| 66 | + }, |
| 67 | + { |
| 68 | + "cell_type": "code", |
| 69 | + "execution_count": null, |
| 70 | + "id": "b23a5047", |
| 71 | + "metadata": {}, |
| 72 | + "outputs": [], |
| 73 | + "source": [ |
| 74 | + "# Main Colormap\n", |
| 75 | + "# main_color_map = 'nipy_spectral'\n", |
| 76 | + "main_color_map = 'viridis'" |
| 77 | + ] |
| 78 | + }, |
48 | 79 | { |
49 | 80 | "cell_type": "code", |
50 | 81 | "execution_count": null, |
|
65 | 96 | { |
66 | 97 | "cell_type": "code", |
67 | 98 | "execution_count": null, |
68 | | - "id": "f8ef41ff", |
| 99 | + "id": "286cc436", |
69 | 100 | "metadata": {}, |
70 | 101 | "outputs": [], |
71 | 102 | "source": [ |
|
273 | 304 | "outputs": [], |
274 | 305 | "source": [ |
275 | 306 | "def plot_2d_node_embeddings(node_embeddings_for_visualization: pd.DataFrame, title: str):\n", |
276 | | - " if embeddings.empty:\n", |
| 307 | + " if node_embeddings_for_visualization.empty:\n", |
277 | 308 | " print(\"No projected data to plot available\")\n", |
278 | 309 | " return\n", |
279 | 310 | "\n", |
280 | 311 | " plot.scatter(\n", |
281 | 312 | " x=node_embeddings_for_visualization.x,\n", |
282 | 313 | " y=node_embeddings_for_visualization.y,\n", |
283 | | - " s=node_embeddings_for_visualization.centrality * 300,\n", |
| 314 | + " s=node_embeddings_for_visualization.centrality * 60,\n", |
284 | 315 | " c=node_embeddings_for_visualization.communityId,\n", |
285 | 316 | " cmap=main_color_map,\n", |
286 | 317 | " )\n", |
|
494 | 525 | "pygments_lexer": "ipython3", |
495 | 526 | "version": "3.12.9" |
496 | 527 | }, |
497 | | - "title": "Object Oriented Design Quality Metrics for Java with Neo4j" |
| 528 | + "title": "Node Embeddings for Java with Neo4j" |
498 | 529 | }, |
499 | 530 | "nbformat": 4, |
500 | 531 | "nbformat_minor": 5 |
|
0 commit comments