pytorch / botorch
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 895 units with 7,443 lines of code in units (34.0% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (44 lines of code)
    • 14 medium complex units (722 lines of code)
    • 46 simple units (1,036 lines of code)
    • 834 very simple units (5,641 lines of code)
0% | <1% | 9% | 13% | 75%
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% | <1% | 10% | 14% | 74%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
botorch/models0% | 1% | 13% | 12% | 72%
botorch/acquisition0% | 0% | 10% | 11% | 77%
botorch/utils0% | 0% | 10% | 16% | 72%
scripts0% | 0% | 9% | 37% | 52%
botorch/optim0% | 0% | 0% | 25% | 74%
botorch/sampling0% | 0% | 0% | 29% | 70%
botorch/posteriors0% | 0% | 0% | 6% | 93%
website/core0% | 0% | 0% | 0% | 100%
website/pages0% | 0% | 0% | 0% | 100%
botorch/generation0% | 0% | 0% | 0% | 100%
botorch0% | 0% | 0% | 0% | 100%
website/static0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
44 28 1
51 22 1
65 17 4
54 16 2
58 15 3
65 15 2
26 15 2
70 15 2
27 13 1
58 13 1
48 13 2
71 12 1
36 12 2
33 11 3
60 11 3
41 10 2
33 10 3
27 10 1
27 9 3
18 9 2
28 9 2
19 9 3
40 9 4
27 9 2
48 9 5
21 8 1
44 8 1
17 8 3
21 8 2
23 8 1
23 8 1
17 8 2
31 8 3
44 7 2
30 7 2
4 7 1
31 7 2
4 7 1
25 7 2
14 7 3
25 7 2
35 7 1
12 7 4
23 7 4
39 6 4
12 6 2
18 6 2
27 6 1
18 6 1
11 6 3