tensorflow / lucid
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 442 units with 4,350 lines of code in units (64.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 16 medium complex units (622 lines of code)
    • 42 simple units (846 lines of code)
    • 384 very simple units (2,882 lines of code)
0% | 0% | 14% | 19% | 66%
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% | 14% | 19% | 66%
js0% | 0% | 0% | 30% | 69%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lucid/scratch/pretty_graphs0% | 0% | 32% | 18% | 49%
lucid/misc/graph_analysis0% | 0% | 32% | 37% | 29%
lucid/misc/io0% | 0% | 10% | 24% | 64%
lucid/modelzoo0% | 0% | 14% | 22% | 62%
lucid/misc0% | 0% | 23% | 11% | 65%
lucid/scratch/atlas_pipeline0% | 0% | 26% | 22% | 50%
lucid/misc/gl0% | 0% | 16% | 0% | 83%
lucid/scratch/rl_util0% | 0% | 10% | 25% | 64%
lucid/recipes0% | 0% | 24% | 29% | 45%
lucid/optvis0% | 0% | 0% | 12% | 87%
lucid/scratch/js0% | 0% | 0% | 30% | 69%
lucid/recipes/activation_atlas0% | 0% | 0% | 16% | 83%
lucid/optvis/param0% | 0% | 0% | 8% | 91%
lucid/scratch/scripts0% | 0% | 0% | 36% | 63%
lucid/modelzoo/other_models0% | 0% | 0% | 85% | 14%
lucid/optvis/overrides0% | 0% | 0% | 0% | 100%
lucid/scratch/web0% | 0% | 0% | 0% | 100%
lucid/scratch0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def render_with_groups()
in lucid/scratch/pretty_graphs/format_graph.py
63 25 5
def suggest_save_args()
in lucid/modelzoo/vision_base.py
67 23 1
def save()
in lucid/misc/io/saving.py
52 21 5
def parse_graph()
in lucid/scratch/pretty_graphs/format_graph.py
60 17 1
def load_obj()
in lucid/misc/gl/meshutil.py
43 17 1
def __init__()
in lucid/misc/graph_analysis/overlay_graph.py
26 13 5
def sample_binary_image()
in lucid/misc/stimuli.py
36 13 5
def _normalize_array()
in lucid/misc/io/serialize_array.py
27 13 3
def get_paths()
in lucid/scratch/rl_util/attribution.py
37 12 5
def collapse_branches()
in lucid/misc/graph_analysis/parse_overlay.py
16 12 1
def parse_structure()
in lucid/misc/graph_analysis/parse_overlay.py
43 12 1
def resize()
in lucid/misc/ndimage_utils.py
27 12 4
def multi_interpolation_basis()
in lucid/recipes/image_interpolation_params.py
33 11 4
def filter_graph()
in lucid/scratch/pretty_graphs/graph.py
29 11 3
def summarize()
in lucid/scratch/atlas_pipeline/pipeline.py
47 11 4
def flatten_sequences()
in lucid/misc/graph_analysis/parse_overlay.py
16 11 1
def find_groups()
in lucid/scratch/pretty_graphs/graph.py
21 10 1
def show()
in lucid/misc/io/showing.py
29 10 3
def __init__()
in lucid/modelzoo/vision_base.py
19 9 3
def filter_graph_collapse_sequence()
in lucid/scratch/pretty_graphs/graph.py
19 9 2