microsoft / vi-hds
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 344 units with 3,478 lines of code in units (79.4% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (122 lines of code)
    • 7 medium complex units (272 lines of code)
    • 24 simple units (735 lines of code)
    • 312 very simple units (2,349 lines of code)
0% | 3% | 7% | 21% | 67%
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% | 3% | 7% | 21% | 67%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
vihds0% | 4% | 9% | 26% | 60%
data0% | 0% | 38% | 6% | 55%
models0% | 0% | 0% | 6% | 93%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def __init__()
in vihds/parameters.py
122 33 5
def xval_variable_parameters()
in vihds/plotting.py
47 18 2
def xval_global_parameters()
in vihds/plotting.py
48 17 2
def load()
in data/procdata.py
35 14 2
def run_graph()
in vihds/run_inference_graph.py
40 14 2
def process_node_args()
in vihds/inference_graph.py
31 12 3
def run()
in vihds/training.py
37 12 1
def __init__()
in vihds/training.py
34 11 6
def proc_data()
in vihds/config.py
20 10 1
def xval_fit_summary()
in vihds/plotting.py
47 10 3
def combined_treatments()
in vihds/plotting.py
66 10 2
def __init__()
in vihds/config.py
31 9 2
def order_distributions()
in vihds/distributions.py
17 9 1
def xval_treatments()
in vihds/plotting.py
54 9 2
def _evaluate_elbo_and_plot()
in vihds/training.py
47 9 5
def load_global_cond()
in vihds/parameters.py
22 8 2
def load_local()
in vihds/parameters.py
19 8 2
53 8 2
def assign_free_and_constrained()
in vihds/distributions.py
10 7 4
def forward()
in vihds/encoders.py
21 7 4