# Is it possible to apply GraphSage algorithm in Graph with edges properties?

**URL:** <https://community.neo4j.com/t/is-it-possible-to-apply-graphsage-algorithm-in-graph-with-edges-properties/51858>\
**Category:** Graph Data Science / Graph Analytics\
**Created:** [February 12, 2022, 8:10pm UTC](https://community.neo4j.com/t/is-it-possible-to-apply-graphsage-algorithm-in-graph-with-edges-properties/51858 "2022-02-12T20:10:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![maristela88.mc](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/maristela88.mc/32/22390_2.png) [@maristela88.mc](https://community.neo4j.com/u/maristela88.mc)\
**Post date:** [February 12, 2022, 8:10pm UTC](https://community.neo4j.com/t/is-it-possible-to-apply-graphsage-algorithm-in-graph-with-edges-properties/51858/1 "2022-02-12T20:10:57Z")

</div>

Hi,

I have a heterogeneous Graph with 2457 nodes and over 12K relationship with nodes & edges properties. I managed to apply the GraphSage algorithm but only added the node's properties.  
I checked the documents, and it seems like that for edges, we can only specify "relationshipTypes" "relationshipWeightProperty."

Is there a way to add the properties of the edges too?

Thank you!

---

<div class="post-metadata">

**Author:** ![sameer.gijare14](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/sameer.gijare14/32/11986_2.png) [@sameer.gijare14](https://community.neo4j.com/u/sameer.gijare14)\
**Post date:** [February 13, 2022, 4:36am UTC](https://community.neo4j.com/t/is-it-possible-to-apply-graphsage-algorithm-in-graph-with-edges-properties/51858/2 "2022-02-13T04:36:06Z")

</div>

Hi

Do you have bloom installed on your system?

Many thanks  
Mr Sameer Sudhir G

---

<div class="post-metadata">

**Author:** ![alicia\_frame1](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/alicia_frame1/32/6998_2.png) [@alicia\_frame1](https://community.neo4j.com/u/alicia_frame1)\
**Post date:** [February 14, 2022, 2:12pm UTC](https://community.neo4j.com/t/is-it-possible-to-apply-graphsage-algorithm-in-graph-with-edges-properties/51858/3 "2022-02-14T14:12:41Z")

</div>

At this point, GraphSAGE only supports node properties and edge weights (which are numeric properties).

---

<div class="post-metadata">

**Author:** ![maristela88.mc](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/maristela88.mc/32/22390_2.png) [@maristela88.mc](https://community.neo4j.com/u/maristela88.mc)\
**Post date:** [February 14, 2022, 8:40pm UTC](https://community.neo4j.com/t/is-it-possible-to-apply-graphsage-algorithm-in-graph-with-edges-properties/51858/4 "2022-02-14T20:40:19Z")

</div>

ok, thank you for your reply 🙂

---

<div class="post-metadata">

**Author:** ![pesle.fanny](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/pesle.fanny/32/27372_2.png) [@pesle.fanny](https://community.neo4j.com/u/pesle.fanny)\
**Post date:** [February 24, 2022, 12:08pm UTC](https://community.neo4j.com/t/is-it-possible-to-apply-graphsage-algorithm-in-graph-with-edges-properties/51858/5 "2022-02-24T12:08:13Z")

</div>

Hi,

Assuming the relationship has a numeric property as required, is it possible to use it as _relationshipWeightProperty_ even if head and tail nodes belong to different labels ?

I am trying to train a GraphSAGE model in the multiLabel configuration, with parameter _projectedFeatureDimension_ set so as to enable multiLabel.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![alicia\_frame1](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/alicia_frame1/32/6998_2.png) [@alicia\_frame1](https://community.neo4j.com/u/alicia_frame1)\
**Post date:** [February 24, 2022, 9:15pm UTC](https://community.neo4j.com/t/is-it-possible-to-apply-graphsage-algorithm-in-graph-with-edges-properties/51858/6 "2022-02-24T21:15:01Z")

</div>

Yes, you can use relationship weights. The performance might not be great, because it wasn't explicitly built to handle different edge types, but tuning it should help 🙂
