Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inSubgraphSize and outSubgraphSize : Should node include itself in count? #191

Closed
jayqi opened this issue Feb 23, 2019 · 4 comments · Fixed by #181
Closed

inSubgraphSize and outSubgraphSize : Should node include itself in count? #191

jayqi opened this issue Feb 23, 2019 · 4 comments · Fixed by #181
Assignees
Labels

Comments

@jayqi
Copy link
Collaborator

jayqi commented Feb 23, 2019

Look at baseballstats:

screen shot 2019-02-23 at 5 01 26 pm

           node inSubgraphSize outSubgraphSize
1:          OPS              1               4
2:      at_bats              4               1
3:  batting_avg              2               2
4:  on_base_pct              1               1
5: slugging_avg              2               2

We can see that these calculations include each node itself in the count. For example, on_base_pct is an orphaned node but it has counts of 1 in both directions.

These measures are included to capture the idea of "number of dependents" and "number of dependencies". I propose to more intuitively and directly represent that idea, we subtract 1 from all of these counts.

This is a change I'm planning to make in #181.

@bburns632
Copy link
Collaborator

@jayqi , since those metrics say "Subgraph Size", I would say include the all nodes in the count (including the original one). Graph size (or order) is conventionally all nodes in the graph, and since we are using that specific term "subgraph", we should follow that convention.

If those metrics said "number of dependents", "number of dependencies", or "number of neighbors" I would say N -1 would be appropriate.

Here are a few other references:

@jayqi
Copy link
Collaborator Author

jayqi commented Feb 25, 2019

@bburns632 Should we ... dare I say it ... consider renaming them again? (😂) I think not including the node in the count is more useful. That way orphan nodes will have both in and out counts of 0.

What if we called them: numOutConnected, numInConnected? For number of connected nodes?

I think you had previously not liked numDependents and numDependencies because they're very similar and confusing to read.

I don't think neighbors is a good designation because typically they mean neighbors to be first-order adjacent nodes, which is just inDegree and outDegree.

@bburns632
Copy link
Collaborator

This sounds like a taxes question: do you claim yourself as a dependent? 😄

How about:
numDependencies (things this thing uses, package dependencies, inSubgraph) and
numConsumers (things that use this thing's code, reverse dependencies, outSubgraph)
?

Let's riff. I think we can come up with better than those two. In both of the above, their proposed value is (subgraph number of nodes - 1).

@jayqi
Copy link
Collaborator Author

jayqi commented Feb 27, 2019

@bburns632 and I just chatted IRL and came up with:

  • recursiveDeps
  • recursiveRevDeps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants