pytorch / captum
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 775 units with 5,889 lines of code in units (33.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (263 lines of code)
    • 15 simple units (479 lines of code)
    • 756 very simple units (5,147 lines of code)
0% | 0% | 4% | 8% | 87%
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
js0% | 0% | 17% | 15% | 67%
py0% | 0% | 2% | 6% | 90%
tsx0% | 0% | 0% | 10% | 89%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
website/pages0% | 0% | 35% | 30% | 33%
captum/metrics0% | 0% | 39% | 25% | 34%
captum/_utils0% | 0% | 4% | 2% | 92%
captum/attr0% | 0% | 1% | 5% | 93%
captum/insights0% | 0% | 0% | 9% | 90%
scripts0% | 0% | 0% | 28% | 71%
captum/influence0% | 0% | 0% | 6% | 93%
website/core0% | 0% | 0% | 0% | 100%
captum/concept0% | 0% | 0% | 0% | 100%
captum/robust0% | 0% | 0% | 0% | 100%
website/static0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
captum/log0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
133 17 0
27 15 1
37 12 2
66 11 1
15 9 1
19 9 6
42 9 1
23 8 1
24 8 3
31 8 2
16 8 2
48 7 1
43 7 1
25 7 1
9 7 4
116 6 0
46 6 1
13 6 3
9 6 1
32 5 2
23 5 2
9 5 3
126 5 1
19 5 4
12 5 1
8 5 1
8 5 3
8 5 4
6 5 4
23 5 1
13 5 1
19 5 3
8 5 2
34 5 1
10 5 2
25 5 4
68 4 0
8 4 2
16 4 0
12 4 1
22 4 3
10 4 2
6 4 2
7 4 4
8 4 1
36 4 1
21 4 2
14 4 4
18 4 0
6 4 1