facebookresearch / poincare-embeddings
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 111 units with 1,001 lines of code in units (64.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (137 lines of code)
    • 8 simple units (206 lines of code)
    • 102 very simple units (658 lines of code)
0% | 0% | 13% | 20% | 65%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
py0% | 0% | 16% | 19% | 63%
pyx0% | 0% | 0% | 25% | 74%
pyi0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 73% | 9% | 17%
hype0% | 0% | 0% | 28% | 71%
hype/manifolds0% | 0% | 0% | 12% | 88%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def main()
in embed.py
137 20 0
def expm()
in hype/manifolds/lorentz.py
33 9 6
def __getitem__()
in hype/sn.py
24 9 2
pyx
def _mk_weights()
in hype/graph_dataset.pyx
29 8 5
def async_eval()
in embed.py
17 7 4
def main()
in hype/hypernymy_eval.py
23 7 2
def step()
in hype/rsgd.py
16 6 4
49 6 4
pyx
def next()
in hype/graph_dataset.pyx
15 6 1
18 5 4
def upgrade_state_dict()
in hype/checkpoint.py
12 4 1
def ptransp()
in hype/manifolds/lorentz.py
18 4 6
def expm()
in hype/manifolds/euclidean.py
9 4 6
def __init__()
in hype/graph.py
28 4 6
23 4 3
pyx
def next()
in hype/adjacency_matrix_dataset.pyx
22 4 1
def initialize()
in hype/checkpoint.py
7 3 2
def save()
in hype/checkpoint.py
11 3 3
def normalize()
in hype/manifolds/lorentz.py
16 3 2
def angle_at_u()
in hype/manifolds/lorentz.py
12 3 3