facebookresearch / deepcluster
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 80 units with 1,341 lines of code in units (80.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 7 medium complex units (379 lines of code)
    • 17 simple units (474 lines of code)
    • 56 very simple units (488 lines of code)
0% | 0% | 28% | 35% | 36%
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% | 28% | 35% | 36%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 31% | 35% | 33%
visu0% | 0% | 31% | 53% | 15%
models0% | 0% | 0% | 20% | 80%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def load()
in eval_retrieval.py
35 18 1
def main()
in visu/activ-retrieval.py
43 16 1
def main()
in eval_voc_classif.py
95 15 0
def cluster()
in clustering.py
29 14 3
37 14 4
def main()
in main.py
103 14 1
def train()
in eval_voc_classif.py
37 13 10
def forward()
in visu/gradient_ascent.py
16 10 4
def main()
in eval_linear.py
85 10 0
28 9 2
def evaluate()
in eval_voc_classif.py
24 9 3
def main()
in visu/gradient_ascent.py
41 8 0
def train()
in main.py
51 8 5
23 8 3
def load_and_prepare_image()
in eval_retrieval.py
18 7 3
def forward()
in visu/activ-retrieval.py
16 7 3
def _initialize_weights()
in models/vgg16.py
14 7 1
def _initialize_weights()
in models/alexnet.py
14 7 1
def __init__()
in eval_voc_classif.py
18 7 4
def forward()
in eval_linear.py
12 7 3