# Native graph reduces degree when all relationship types are present

**URL:** <https://community.neo4j.com/t/native-graph-reduces-degree-when-all-relationship-types-are-present/33840>\
**Category:** Graph Data Science / Graph Analytics\
**Tags:** data-science\
**Created:** [February 17, 2021, 8:31am UTC](https://community.neo4j.com/t/native-graph-reduces-degree-when-all-relationship-types-are-present/33840 "2021-02-17T08:31:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![georg\_kf\_heiler](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/georg_kf_heiler/32/12637_2.png) [@georg\_kf\_heiler](https://community.neo4j.com/u/georg_kf_heiler)\
**Post date:** [February 17, 2021, 8:31am UTC](https://community.neo4j.com/t/native-graph-reduces-degree-when-all-relationship-types-are-present/33840/1 "2021-02-17T08:31:43Z")

</div>

I want to execute graph algorithms from the GDS plugin. To do so, a graph projection needs to be defined: [Graph Catalog - Neo4j Graph Data Science](https://neo4j.com/docs/graph-data-science/current/management-ops/graph-catalog-ops/#catalog-graph-drop)

However, I noticed that there is a huge difference in the degree distribution (max of 10k) when only using (A) (= only Friends) but the max is down to 5 when using all the relations present in (B).

This seems strange to me - I would have expected that the max degree can only increase when more diverse types of relationships are made available to the GDS graph.

```auto

CALL gds.graph.drop('my_graph') YIELD graphName;

// A: only Friend
CALL gds.graph.create.cypher(
    'my_graph',
    'MATCH (n) RETURN id(n) AS id',
    'MATCH (a)-[r:Friend]->(b) RETURN id(a) AS source, id(b) AS target'
);

// B: everything
CALL gds.graph.create.cypher(
    'my_graph',
    'MATCH (n) RETURN id(n) AS id',
    'MATCH (a)-[r]->(b) RETURN id(a) AS source, id(b) AS target'
);
CALL gds.graph.list();

```

---

<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 18, 2021, 3:19pm UTC](https://community.neo4j.com/t/native-graph-reduces-degree-when-all-relationship-types-are-present/33840/2 "2021-02-18T15:19:42Z")

</div>

You'll want to look at relationship aggregation parameters: [https://neo4j.com/docs/graph-data-science/current/management-ops/cypher-projection/#cypher-projection-relationship-aggregation](https://neo4j.com/docs/graph-data-science/current/management-ops/cypher-projection/#cypher-projection-relationship-aggregation)  
  
  
My suspicion is that, while the degree is higher, the number of nodes is lower for the `Friend` projection. I assume you're using percentiles vs maximum?

---

<div class="post-metadata">

**Author:** ![georg\_kf\_heiler](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/georg_kf_heiler/32/12637_2.png) [@georg\_kf\_heiler](https://community.neo4j.com/u/georg_kf_heiler)\
**Post date:** [February 19, 2021, 2:57pm UTC](https://community.neo4j.com/t/native-graph-reduces-degree-when-all-relationship-types-are-present/33840/3 "2021-02-19T14:57:22Z")

</div>

I was looking at the output for: `CALL gds.graph.list();` and there at the max degree attribute. This attribute decreased drastically when adding more relationships - and I still do not understand why.
