facebookresearch / active-mri-acquisition
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 229 units with 2,434 lines of code in units (61.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (323 lines of code)
    • 13 simple units (419 lines of code)
    • 213 very simple units (1,692 lines of code)
0% | 0% | 13% | 17% | 69%
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% | 13% | 17% | 69%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
activemri/experimental/cvpr19_models0% | 0% | 46% | 18% | 34%
activemri/baselines0% | 0% | 17% | 24% | 58%
activemri/experimental/cvpr19_models/models0% | 0% | 7% | 8% | 83%
activemri/experimental/cvpr19_models/data0% | 0% | 0% | 29% | 70%
activemri/envs0% | 0% | 0% | 13% | 86%
activemri/experimental/cvpr19_models/options0% | 0% | 0% | 9% | 90%
activemri/data0% | 0% | 0% | 0% | 100%
activemri/experimental/cvpr19_models/util0% | 0% | 0% | 0% | 100%
activemri/models0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _train_dqn_policy()
in activemri/baselines/ddqn.py
107 14 1
def __call__()
in activemri/experimental/cvpr19_models/trainer.py
192 13 1
def init_func()
in activemri/experimental/cvpr19_models/models/reconstruction.py
24 11 1
def update()
in activemri/experimental/cvpr19_models/trainer.py
60 10 2
def _init_from_config_dict()
in activemri/envs/envs.py
51 10 3
def get_mask_func()
in activemri/experimental/cvpr19_models/data/masking_utils.py
46 8 3
def get_action()
in activemri/baselines/simple_baselines.py
26 8 4
def update_parameters()
in activemri/baselines/ddqn.py
46 7 2
def parse()
in activemri/experimental/cvpr19_models/options/base_options.py
18 6 2
def get_target_tensor()
in activemri/experimental/cvpr19_models/models/fft_utils.py
26 6 6
def load_weights_from_given_checkpoint()
in activemri/experimental/cvpr19_models/trainer.py
18 6 1
def __init__()
in activemri/experimental/cvpr19_models/data/dicom_data_loader.py
20 6 4
def __call__()
in activemri/experimental/cvpr19_models/data/masking_utils.py
28 6 3
def __call__()
in activemri/baselines/ddqn.py
39 6 1
def _cartesian_mask()
in activemri/baselines/simple_baselines.py
23 6 2
def _get_new_mask()
in activemri/baselines/simple_baselines.py
18 6 2
def initialize()
in activemri/experimental/cvpr19_models/options/train_options.py
88 5 2
def tensor2im()
in activemri/experimental/cvpr19_models/util/common.py
15 5 3
def forward()
in activemri/experimental/cvpr19_models/models/reconstruction.py
32 5 3
def ifftshift()
in activemri/experimental/cvpr19_models/models/fft_utils.py
9 5 2