aws-samples / lm-gvp
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 102 units with 1,036 lines of code in units (64.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (75 lines of code)
    • 7 simple units (189 lines of code)
    • 93 very simple units (772 lines of code)
0% | 0% | 7% | 18% | 74%
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% | 7% | 18% | 74%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lmgvp0% | 0% | 7% | 14% | 77%
data0% | 0% | 11% | 26% | 62%
ROOT0% | 0% | 0% | 30% | 69%
contact_map0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def get_dataset()
in lmgvp/data_loaders.py
50 13 3
def init_residue()
in data/xpdb.py
25 12 5
def load_GO_annot()
in lmgvp/deepfrier_utils.py
36 9 1
def _forward()
in lmgvp/modules.py
27 9 2
def _forward()
in lmgvp/modules.py
32 9 3
def evaluate()
in train.py
37 8 3
def chain_to_coords()
in data/prepare_GO_data.py
22 7 6
def idx_align()
in data/contact_map_utils.py
22 6 2
def get_energy()
in data/contact_map_utils.py
13 6 1
def main()
in data/prepare_data.py
29 5 0
def load_state_dict_to_model()
in lmgvp/transfer.py
13 5 2
def main()
in train.py
76 4 1
def __getitem__()
in lmgvp/datasets.py
4 4 2
def _preprocess()
in lmgvp/datasets.py
11 4 1
def _parse_structure()
in data/contact_map_utils.py
8 3 3
def is_aa_by_target_atoms()
in data/contact_map_utils.py
8 3 1
def structure_to_coords()
in data/prepare_data.py
15 3 6
def get_atom_coords()
in data/prepare_GO_data.py
9 3 5
def preprocess_seqs()
in lmgvp/data_loaders.py
7 3 2
def load_FASTA()
in lmgvp/deepfrier_utils.py
8 3 1