apoc.stats.degrees
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime. For more information, see the Cypher Manual → Parallel runtime. |
Syntax |
|
||
Description |
Returns the percentile groupings of the degrees on the |
||
Input arguments |
Name |
Type |
Description |
|
|
The relationship types to calculate the percentile grouping over. If this is empty or omitted, all relationships are used. The default is: ``. |
|
Return arguments |
Name |
Type |
Description |
|
|
The type of the relationship. |
|
|
|
The direction of the relationship. |
|
|
|
The total observed relationships. |
|
|
|
The 50th percentile grouping. |
|
|
|
The 75th percentile grouping. |
|
|
|
The 90th percentile grouping. |
|
|
|
The 95th percentile grouping. |
|
|
|
The 99th percentile grouping. |
|
|
|
The 99.9th percentile grouping. |
|
|
|
The max value. |
|
|
|
The min value. |
|
|
|
The mean value. |
Usage Examples
The examples in this section are based on the following sample graph:
CREATE (TheMatrix:Movie {title:'The Matrix', released:1999, tagline:'Welcome to the Real World'})
CREATE (Keanu:Person {name:'Keanu Reeves', born:1964})
CREATE (Carrie:Person {name:'Carrie-Anne Moss', born:1967})
CREATE (Laurence:Person {name:'Laurence Fishburne', born:1961})
CREATE (Hugo:Person {name:'Hugo Weaving', born:1960})
CREATE (LillyW:Person {name:'Lilly Wachowski', born:1967})
CREATE (LanaW:Person {name:'Lana Wachowski', born:1965})
CREATE (JoelS:Person {name:'Joel Silver', born:1952})
CREATE
(Keanu)-[:ACTED_IN {roles:['Neo']}]->(TheMatrix),
(Carrie)-[:ACTED_IN {roles:['Trinity']}]->(TheMatrix),
(Laurence)-[:ACTED_IN {roles:['Morpheus']}]->(TheMatrix),
(Hugo)-[:ACTED_IN {roles:['Agent Smith']}]->(TheMatrix),
(LillyW)-[:DIRECTED]->(TheMatrix),
(LanaW)-[:DIRECTED]->(TheMatrix),
(JoelS)-[:PRODUCED]->(TheMatrix);
CALL apoc.stats.degrees();
type | direction | total | p50 | p75 | p90 | p95 | p99 | p999 | max | min | mean |
---|---|---|---|---|---|---|---|---|---|---|---|
NULL |
"BOTH" |
7 |
1 |
1 |
1 |
7 |
7 |
7 |
7 |
1 |
1.75 |
CALL apoc.stats.degrees("ACTED_IN");
type | direction | total | p50 | p75 | p90 | p95 | p99 | p999 | max | min | mean |
---|---|---|---|---|---|---|---|---|---|---|---|
"ACTED_IN" |
"BOTH" |
4 |
1 |
1 |
1 |
4 |
4 |
4 |
4 |
0 |
1.0 |