Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-14-2021 10:54 PM
Hi everyone.
I have tried to use node embeddings as suggested but i wonder is it possible to do node embeddings with this much of different node labels and relationships?
I tried to use GraphSAGE but I kept getting error, which is
Is this because I did not specify defaultValue: 0 when I created my graph? This is how I created my graph.
Hope I can get answer to is it plausible to use GraphSAGE for this.
Solved! Go to Solution.
11-22-2021 07:46 AM
Hey @nuraishahzaidi01,
as Sean already mentioned, the featureProperties
only look for node properties in the projected graph.
Is your JobVector
a node or a relationship property?
Important to note is, that currently GDS does not support array properties on relationships.
Supported relationship properties are doubles and integers (see Creating graphs - Neo4j Graph Data Science).
11-15-2021 10:36 AM
It looks like you aren't including any node properties when creating your graph. I would reference this code sample from this example from the docs.
CALL gds.graph.create(
'persons_with_instruments',
{
Person: {
label: 'Person',
properties: ['age', 'heightAndWeight']
},
Instrument: {
label: 'Instrument',
properties: ['cost']
}
}, {
KNOWS: {
type: 'KNOWS',
orientation: 'UNDIRECTED'
},
LIKES: {
type: 'LIKES',
orientation: 'UNDIRECTED'
}
})
CALL gds.beta.graphSage.train(
'persons_with_instruments',
{
modelName: 'multiLabelModel',
featureProperties: ['age', 'heightAndWeight', 'cost'],
projectedFeatureDimension: 4
}
)
11-15-2021 06:49 PM
Hi Sean,
Thanks for replying.
I have tried created a different graph based on the reference you shared:
But it still gives the same error.
Failed to invoke procedure gds.beta.graphSage.train
: Caused by: java.lang.IllegalArgumentException: The feature properties ['JobVector'] are not present for all requested labels. Requested labels: ['Course', 'Field', 'Jobads', 'Jobbg', 'Joblevel', 'Qual', 'Skill', 'University', 'User']. Properties available on all requested labels:
Thank you for your help!
11-16-2021 09:51 AM
Well here it looks like your JobVector
property is a property of the WORK_AS
relationship, not a node. In which case, the featureProperties
parameter won't see it as it refers to node properties. I think you want the relationshipWeightProperty
parameter in this case. Although I'm not sure if it is required to exist on all relationships.
11-16-2021 09:51 PM
Hi Sean,
I changed it to relationshipWeightProperty
parameter and i think that's correct too. But still, it is showing the same error. I guess it is required to exist on all relationships.
Thank you though for your help!
11-22-2021 07:46 AM
Hey @nuraishahzaidi01,
as Sean already mentioned, the featureProperties
only look for node properties in the projected graph.
Is your JobVector
a node or a relationship property?
Important to note is, that currently GDS does not support array properties on relationships.
Supported relationship properties are doubles and integers (see Creating graphs - Neo4j Graph Data Science).
11-22-2021 04:53 PM
Hi @florentin.dorre,
My JobVector
is a relationship property.
Ahh I see, I'm sorry I think I missed out on that one. Thank you for your clarification, I will have to try to find some other ways to include the array in the graph then.
Thanks again!
11-23-2021 03:31 AM
Glad I could help.
We can also try to make the documentation clearer. Do you have a suggestion at which place you would have expected to read the limitation?
02-09-2022 05:59 PM
Hi @florentin.dorre,
Very sorry for the late reply, I have been moved to another project and had to stop doing this one. But on your question, I think in the documentation if it's possible to have " GDS does not support array properties on relationships" as a ! caution or something along the lines would be great. If this can be included in the 2.5. Relationship properties.
Because I got confused with the properties type (in 1.2 Relationship Projection as shown in the photo). I thought the type for properties meant for properties on the relationships.
That was my mistake.
Thank you again. Looking forward to use Neo4j in the future 🙂
All the sessions of the conference are now available online