facebookresearch / protein-ebm
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 98 units with 2,443 lines of code in units (78.5% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (496 lines of code)
    • 8 medium complex units (544 lines of code)
    • 8 simple units (259 lines of code)
    • 79 very simple units (1,144 lines of code)
0% | 20% | 22% | 10% | 46%
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% | 20% | 22% | 10% | 46%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 21% | 23% | 11% | 43%
scripts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def main_single()
in vis_sandbox.py
125 36 1
196 35 3
def rotamer_trials()
in vis_sandbox.py
175 29 3
157 25 2
def _preprocess_db()
in mmcif_utils.py
72 19 2
def propagate()
in torch_geometric_utils.py
44 18 4
def test()
in train.py
82 15 5
def new_model()
in vis_sandbox.py
79 15 3
def cif_to_embed()
in mmcif_utils.py
33 13 3
def parse_dense_format()
in mmcif_utils.py
43 11 1
34 11 1
def sample_weighted_df()
in mmcif_utils.py
29 10 3
def make_tsne()
in vis_sandbox.py
52 9 3
def _parse_residue()
in mmcif_utils.py
33 8 1
def pair_model()
in vis_sandbox.py
76 7 3
16 7 2
def sample_df()
in mmcif_utils.py
21 7 3
def forward()
in torch_geometric_utils.py
13 6 4
def main()
in train.py
19 6 0
def __init__()
in torch_geometric_utils.py
12 5 3