cancel
Showing results for 
Search instead for 
Did you mean: 

Join the community at Nodes 2022, our free virtual event on November 16 - 17.

Numerical Vectors as projected properties

stu_v_kerr
Node Clone

Question for the Neo4j GDS Team: 
Given that Neo4j permits node embeddings as a node property in a projected graph, I figured that Neo4j GDS Library would permit the projection of a numerical vector as a projected relationship property. This has been unsuccessful. This capability is important given that we have many categorical features for which we execute gds.alpha.ml.oneHotEncoding() and then need to project. Two questions:
1. Is this possible because I am getting the following error: 

ClientError: {code: Neo.ClientError.Procedure.ProcedureCallFailed} {message: Failed to invoke procedure `gds.graph.project`: Caused by: java.lang.IllegalArgumentException: Unsupported type [NUMBER_ARRAY] of value LongArray[0, 0, 0, 1, 0, 0, 0]. Please use a numeric property.}

2. If not possible, can you suggest an alternative approach? 

Thanks!

#GDS

2 REPLIES 2

As the error indicates we only support scalar numeric properties on relationships at the moment.  Regarding #2, what is it your trying to accomplish?  Can you use different relationship types instead of a property? or move properties to source and target nodes instead?

Thanks for the reply Zach (and for your GDS postings in general). 
The reason why i wanted to put a numerical vector property on a relationship is that I have temporally linked each person's (could be 20K people) activities (could be thousands of activities) where the activity destination are the only linked nodes (the person node has been removed) and the relationships contain properties to uniquely identify the person associated with that relationship. Each person belongs to a particular categorical category, so i one-hot-encoded those categories into a vector - which is what i wanted to place on the relationship (where i wanted a single relationship type).
Again, appreciate the response.