amazon-research / relaxed-adaptive-projection
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 90 units with 650 lines of code in units (44.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (78 lines of code)
    • 4 simple units (54 lines of code)
    • 83 very simple units (518 lines of code)
0% | 0% | 12% | 8% | 79%
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% | 12% | 8% | 79%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
datasets0% | 0% | 31% | 14% | 53%
ROOT0% | 0% | 0% | 8% | 91%
privacy_budget_tracking0% | 0% | 0% | 0% | 100%
relaxed_adaptive_projection0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def get_queries()
in datasets/loans.py
26 13 3
def get_queries()
in datasets/toy_binary.py
26 13 3
def get_queries()
in datasets/adult.py
26 13 3
def project_feats()
in datasets/loans.py
12 6 2
def project_feats()
in datasets/toy_binary.py
12 6 2
def project_feats()
in datasets/adult.py
12 6 2
def preserve_statistic()
in statistickway.py
18 6 1
def randomKway()
in datasets/loans.py
11 5 4
def randomKway()
in datasets/toy_binary.py
11 5 4
def randomKway()
in datasets/adult.py
11 5 4
def __initialize_synthetic_dataset()
in relaxed_adaptive_projection/rap.py
19 5 2
def generate_random_noise()
in privacy_budget_tracking/zcdp_tracker.py
6 5 3
def GDP_to_DP()
in utils_data.py
18 5 2
def DP_to_GDP()
in utils_data.py
18 5 2
def numeric_sparse()
in utils_data.py
17 5 7
def preserve_statistic()
in statistickway_threshold.py
20 5 1
def get_dataset()
in datasets/loans.py
11 4 1
def get_dataset()
in datasets/toy_binary.py
11 4 1
def get_dataset()
in datasets/adult.py
11 4 1
def init_D_prime()
in utils_data.py
13 4 5