Approximate maximum k-cut example returns error

Dear all,

I am learning the graph algorithms with online documents and I currently have problem with the example described under the link of approaximate maximum k-cut.

I copied the code as exactly as shown in the document page but I received an error message at the step 4.3. Mutate with relationship weights .

CALL gds.graph.streamNodeProperties('myGraph', 'weightedCommunity')
YIELD nodeId, propertyValue
RETURN gds.util.asNode(nodeId).name as name, propertyValue AS weightedCommunity

The error message was shown as below:

I didn't modify anything and just copied the code step by step as in the example.
Therefore, I was wondering where could I do wrong.

I would appreciate if anyone can give me a hint on that.

Thank you
Best Regards

Hello @yuxin16,
It should begds.graph.streamNodeProperty and not gds.graph.streamNodeProperties.
The difference is, that streamNodeProperty allows to only specify a String as the second parameter, while streamNodeProperties takes a List.

The memory estimation example also uses the correct version.
We will fix the other place :)

The docs have been updated now: Approximate Maximum k-cut - Neo4j Graph Data Science

Thank you for reporting this :slight_smile:

2 Likes

Oh, I see. Thanks for explanation!

Thanks! It works now!

2 Likes