Entry G14: Global Counts Comparison

3 minute read

The notebook that accompanies this entry is the cleaned up, concise version of the three notebooks that accompanied Entry G6, but limited to just the global counts for the three graph models.

As long as I’m cleaning things up, I decided to provide some additional pictures and commentary on global counts. Keep in mind that this entry is a supplement to Entry G6, not a replacement, so be sure to read that entry first.

Overview

Now that the info for all three graph models are pulled into the same notebook, we can really start to see how the graph model effects the nodes and relationships in the graph.

The global count metrics I used can be summed up by counting the nodes and relationships in the picture below:

The picture has:

  • 16 nodes, of which 12 are Hero nodes and 4 are Comic nodes
  • 13 relationships (all of which are between a Hero and a Comic, never between two of the same node type)
  • 1 isolated Hero node (outlined in orange)

Node Counts

With the node counts for all three graph models in the same DataFrame it’s easy to see how the graph model effects the nodes in each graph.

The Hero nodes are the same for all three models and the Comic nodes are the same for the Bimodal Model and Mixed Model. As far as the nodes are concerned, the only different is that the Comic nodes were removed from the Unimodal Model.

Hero Comic total
uimodal 6439 0.0 6439.0
bimodal 6439 12651.0 19090.0
mixmodal 6439 12651.0 19090.0

Relationship Count

The relationships are where the main differences are between the three graph models.

When looking at the total relationship counts, each model has a different value:

  • Bimodal is smallest with 96,104
  • Unimodal is in the middle with 171,644
  • Mixed is largest with 267,748

Keep in mind that the Unimodal Model has weighted relationships (for information on weighted relationships see Entry G4). While we are projecting relationships based on the original Bimodal Model, we end up with a lot more connections in the projected version. If we include the weights we get a total relationship count of 579,191 for Hero to Hero relationships (which we know from the Entry G13 notebook). That’s around 6 times the number of connections from the original representation.

KNOWS APPEARS_IN Total
unimodal 171644.0 0.0 171644.0
bimodal 0.0 96104.0 96104.0
mixmodal 171644.0 96104.0 267748.0

When we break these down by relationship type, it becomes obvious that the Unimodal and Mixed Models have the same count for KNOWS relationships, while the Bimodal and Mixed Models have the same count for APPEARS_IN. The total count for the Mixed Model is just the addition of the relationships in the Unimodal and Bimodal Models.

This reflects how we created the models:

  1. Started with Bimodal:
    • Hero nodes
    • Comic nodes
    • APPEARS_IN relationships
  2. Created the Mixed model: added the KNOWS relationship between Hero nodes
    • Hero nodes
    • Comic nodes
    • APPEARS_IN relationships
    • KNOWS relationships
  3. Reduced to the Unimodal model: removed the Comic nodes and all the APPEARS_IN relationships
    • Hero nodes
    • KNOWS relationships

Isolate Count and Percent

The isolate count and percent just give us more information about the connectedness of the graph. When we look at the values for the Bimodal Model below, we can see that the diagram used to illustrate the three global counts at the beginning of the entry is actually impossible.

That graph has two nodes types (must be the Bimodal or Mixed Models) and relationships only between Hero to Comic (rules out the Mixed Model). However, the actual metrics tell us that there are no isolated nodes in the Bimodal Model. Good thing that diagram was for illustration purposes only.

As noted in Entry G6 the only graph model that has isolated nodes is the Unimodal Model. Even this graph has a very small percent of isolated nodes at 0.28%.

node_count relation_ct isolates_count isolates_pct
unimodal 6439 171644 18 0.28
bimodal 19090 96104 0 0.00
mixmodal 19090 267748 0 0.00

Up Next

Global Density Comparison

Resources