tensorflow / privacy
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 611 units with 8,296 lines of code in units (81.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 26 medium complex units (1,201 lines of code)
    • 67 simple units (2,008 lines of code)
    • 518 very simple units (5,087 lines of code)
0% | 0% | 14% | 24% | 61%
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% | 24% | 61%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tensorflow_privacy/privacy0% | 0% | 11% | 19% | 69%
research/pate_20170% | 0% | 27% | 21% | 50%
research/pate_20180% | 0% | 14% | 24% | 60%
tutorials0% | 0% | 17% | 48% | 33%
research/GDP_20190% | 0% | 47% | 41% | 11%
tutorials/walkthrough0% | 0% | 0% | 30% | 69%
g3doc0% | 0% | 0% | 51% | 48%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def main()
in research/pate_2017/analysis.py
56 19 1
def _maybe_compose()
in tensorflow_privacy/privacy/analysis/rdp_privacy_accountant.py
46 17 4
def validate()
in tensorflow_privacy/privacy/privacy_tests/membership_inference_attack/data_structures.py
50 17 1
def main()
in tutorials/mnist_dpsgd_tutorial_eager.py
61 16 1
def get_cumsum_and_update()
in tensorflow_privacy/privacy/dp_query/tree_aggregation.py
42 15 2
def compute_gradients()
in tensorflow_privacy/privacy/optimizers/dp_optimizer.py
92 15 8
def extract_cifar10()
in research/pate_2017/input.py
52 15 2
def compute_local_sensitivity_bounds_gnmax()
in research/pate_2018/smooth_sensitivity.py
29 15 4
def _find_optimal_smooth_sensitivity_parameters()
in research/pate_2018/ICLR2018/smooth_sensitivity_table.py
58 15 10
def get_cumsum_and_update()
in tensorflow_privacy/privacy/dp_query/tree_aggregation.py
47 14 2
def _compute_epsilon()
in tensorflow_privacy/privacy/analysis/rdp_privacy_accountant.py
24 14 3
def validate()
in tensorflow_privacy/privacy/privacy_tests/membership_inference_attack/seq2seq_mia.py
23 14 1
def rdp_gaussian()
in research/pate_2018/core.py
31 14 3
def _create_tpu_estimator_spec()
in tensorflow_privacy/privacy/estimators/v1/head.py
117 13 8
def calculate_class_weights()
in tensorflow_privacy/privacy/bolt_on/models.py
46 13 4
def analyze_gnmax_conf_data_dep()
in research/pate_2018/ICLR2018/plot_partition.py
82 13 5
def _tree_sensitivity_square_sum()
in tensorflow_privacy/privacy/analysis/tree_aggregation_accountant.py
38 12 5
def main()
in research/GDP_2019/imdb_tutorial.py
38 12 1
def main()
in research/GDP_2019/adult_tutorial.py
38 12 1
def noisy_max()
in research/pate_2017/aggregation.py
20 12 3