Neo4j, Graph Data Science Python Library Scaling Functions

114 Views Asked by At

Does anyone know whether the scaling functions mentioned here https://neo4j.com/docs/graph-data-science/current/alpha-algorithms/scale-properties/ exist within the python library, if so how can I call them?

1

There are 1 best solutions below

0
On

All the functions should be available through GDS python client. The following code should work:

G, metadata = gds.graph.project(
  'myGraph',
  'Hotel',
  '*',
  { nodeProperties: ['avgReview', 'buildYear', 'storyCapacity'] }
)


gds.alpha.scaleProperties.stream(G, {
  'nodeProperties': ['buildYear', 'avgReview'],
  'scaler': 'MinMax'
})