facebookresearch / deep-variance-reduction
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 172 units with 3,047 lines of code in units (80.0% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (88 lines of code)
    • 18 medium complex units (786 lines of code)
    • 28 simple units (782 lines of code)
    • 125 very simple units (1,391 lines of code)
0% | 2% | 25% | 25% | 45%
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% | 2% | 25% | 25% | 45%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 3% | 20% | 25% | 50%
reproduce0% | 0% | 71% | 23% | 4%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
88 27 3
def cifar10()
in problems.py
98 18 1
def labelLine()
in reproduce/label_lines.py
43 16 5
def plot_averaged()
in reproduce/plot_test_error_with_bars.py
71 15 4
def plot_variance_ratios()
in reproduce/plot_variance_ratio.py
62 13 3
def __init__()
in UpdatedDataLoaderMult.py
31 13 12
50 13 7
def __init__()
in resnext.py
42 13 9
def plot_averaged()
in reproduce/plot_test_error.py
58 12 4
def train_scsg()
in run_vr.py
44 12 8
29 11 1
def default_collate()
in UpdatedDataLoaderMult.py
33 11 1
def in_run_diagnostics()
in diagnostics.py
29 11 7
def scsg_diagnostics()
in diagnostics.py
61 11 6
def recalibrate()
in run_vr.py
36 11 8
def resize()
in caching_transforms.py
19 11 3
def to_tensor()
in caching_transforms.py
28 11 1
def default_collate()
in UpdatedDataLoader.py
29 11 1
def __init__()
in UpdatedDataLoader.py
23 11 10
def initialize()
in recompute_svrg.py
19 10 1