diff --git a/changelog.md b/changelog.md index 51c92790..5f4ee7e5 100644 --- a/changelog.md +++ b/changelog.md @@ -9,6 +9,8 @@ ## Bug fixes +* Fixed a bug with `from_gds` where graphs with different relationship types would fail if they had different properties. + ## Improvements diff --git a/examples/gds-example.ipynb b/examples/gds-example.ipynb index ceff4224..17f7cffb 100644 --- a/examples/gds-example.ipynb +++ b/examples/gds-example.ipynb @@ -52,7 +52,7 @@ "metadata": {}, "outputs": [], "source": [ - "G = gds.graph.load_cora(graph_name=\"c2\")" + "G = gds.graph.load_cora()" ] }, { @@ -69,41 +69,6 @@ "gds.louvain.mutate(G, mutateProperty=\"componentId\")" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "For visualization we recommend limiting the number of nodes to 10k.\n", - "A good way to create a smaller subgraph is by using the [sampling](https://neo4j.com/docs/graph-data-science/current/management-ops/graph-creation/sampling/) or [filtering](https://neo4j.com/docs/graph-data-science/current/management-ops/graph-creation/graph-filter/) the GDS graph." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "G_sample, _ = gds.graph.sample.rwr(\"sampled\", G)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "G_sample.node_properties()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "G_sample.relationship_properties()" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -121,15 +86,16 @@ "\n", "VG = from_gds(\n", " gds,\n", - " G_sample,\n", + " G,\n", " size_property=\"pagerank\",\n", " additional_node_properties=[\"componentId\", \"subject\"],\n", + " max_node_count=100,\n", ")" ] }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 6, "metadata": { "tags": [ "preserve-output" @@ -196,27 +162,27 @@ "}\n", "\n", " \n", - "
\n", + "
\n", "
\n", - " \n", - " \n", - " \n", "
\n", - "
\n", + "
\n", "
\n", "\n", "