Sorry, I would say is not correct. To make this clear, I'll show you an example:
We have this example graph with two labels and two relationship types.
We can generate the graph with the following code:
MATCH
(dan:Person {name: "Dan"}),
(annie:Person {name: "Annie"}),
(matt:Person {name: "Matt"}),
(brie:Person {name: "Brie"}),
(john:Person {name: "John"})
CREATE
(guitar:Instrument {name: 'Guitar', cost: 1337.0}),
(synth:Instrument {name: 'Synthesizer', cost: 1337.0}),
(bongos:Instrument {name: 'Bongos', cost: 42.0}),
(trumpet:Instrument {name: 'Trumpet', cost: 1337.0}),
(dan)-[:LIKES]->(guitar),
(dan)-[:LIKES]->(synth),
(dan)-[:LIKES]->(bongos),
(annie)-[:LIKES]->(guitar),
(annie)-[:LIKES]->(synth),
(matt)-[:LIKES]->(bongos),
(brie)-[:LIKES]->(guitar),
(brie)-[:LIKES]->(synth),
(brie)-[:LIKES]->(bongos),
(john)-[:LIKES]->(trumpet)
Now, we create the projection:
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'
}
})
Notice that the projection includes two different labels and two different types.
We can now run GraphSAGE in multi-label mode on that graph by specifying the projectedFeatureDimension
parameter. Also, you must take into account the assumptions I mentioned in my first reply.
CALL gds.beta.graphSage.train(
'persons_with_instruments',
{
modelName: 'multiLabelModel',
featureProperties: ['age', 'heightAndWeight', 'cost'],
projectedFeatureDimension: 4
}
)
Based on this, we can observe that GraphSAGE works on heterogenous graphs and do differentiate between different node labels or relationship types.
Hope this helps. If it does, you can set this answer as the solution