facebookresearch / neuralvolumes
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 55 units with 714 lines of code in units (78.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (153 lines of code)
    • 8 simple units (186 lines of code)
    • 44 very simple units (375 lines of code)
0% | 0% | 21% | 26% | 52%
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% | 21% | 26% | 52%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
models0% | 0% | 47% | 24% | 27%
data0% | 0% | 36% | 38% | 25%
models/decoders0% | 0% | 0% | 14% | 85%
eval/writers0% | 0% | 0% | 42% | 58%
models/volsamplers0% | 0% | 0% | 85% | 14%
ROOT0% | 0% | 0% | 48% | 51%
models/encoders0% | 0% | 0% | 0% | 100%
eval/cameras0% | 0% | 0% | 0% | 100%
models/colorcals0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def forward()
in models/neurvol1.py
83 17 17
def __getitem__()
in data/dryice1.py
52 13 2
def initmod()
in models/utils.py
18 11 3
def xaviermultiplier()
in models/utils.py
38 8 2
def __init__()
in train.py
17 8 3
def load_krt()
in data/dryice1.py
16 8 1
def __init__()
in data/dryice1.py
38 8 12
def forward()
in models/decoders/voxel1.py
25 7 4
def batch()
in eval/writers/videowriter.py
21 7 8
def initseq()
in models/utils.py
13 6 1
def forward()
in models/volsamplers/warpvoxel.py
18 6 9
def __init__()
in models/encoders/mvconv1.py
26 5 3
def forward()
in models/encoders/mvconv1.py
14 5 3
def __init__()
in models/decoders/voxel1.py
19 4 4
def __init__()
in models/decoders/voxel1.py
32 4 7
def get_background()
in data/dryice1.py
5 4 2
def __init__()
in models/neurvol1.py
17 3 9
def state_dict()
in models/neurvol1.py
6 3 4
def gettemplate()
in models/decoders/voxel1.py
7 3 2
def forward()
in models/decoders/voxel1.py
19 3 2