facebookresearch / private_prediction
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 51 units with 942 lines of code in units (80.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 7 medium complex units (324 lines of code)
    • 8 simple units (201 lines of code)
    • 36 very simple units (417 lines of code)
0% | 0% | 34% | 21% | 44%
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% | 34% | 21% | 44%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 34% | 21% | 44%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def sensitivity_scale()
in private_prediction.py
45 21 7
def train_model()
in modeling.py
57 18 12
def main()
in private_prediction_experiment.py
44 18 1
def compute_accuracy()
in private_prediction.py
36 15 4
def cross_validate()
in private_prediction_experiment.py
44 15 3
def logit_sensitivity_method()
in private_prediction.py
49 14 4
def subsagg_method()
in private_prediction.py
49 13 4
26 10 4
def privatize_model()
in modeling.py
16 8 3
def pca()
in dataloading.py
26 7 3
def main()
in install.py
20 7 0
def load_datasampler()
in dataloading.py
21 6 4
def loss_perturbation_method()
in private_prediction.py
38 6 4
def dpsgd_method()
in private_prediction.py
39 6 4
def test_model()
in modeling.py
15 6 4
def model_sensitivity_method()
in private_prediction.py
33 5 4
14 5 3
def download()
in dataloading.py
18 4 1
def subsample()
in dataloading.py
14 4 3
11 4 5