awslabs / aws-cv-unique-information
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 154 units with 2,942 lines of code in units (90.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 10 medium complex units (574 lines of code)
    • 19 simple units (779 lines of code)
    • 125 very simple units (1,589 lines of code)
0% | 0% | 19% | 26% | 54%
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% | 19% | 26% | 54%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
modules0% | 0% | 29% | 34% | 36%
scripts0% | 0% | 16% | 24% | 59%
methods0% | 0% | 0% | 12% | 87%
archive0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def main()
in sample_info/scripts/compute_influence_functions_brute_force.py
106 19 0
def weight_stability()
in sample_info/modules/stability.py
68 17 16
def main()
in sample_info/scripts/compute_influence_functions.py
96 17 0
def get_weights_at_time_t()
in sample_info/modules/ntk.py
46 16 13
def compute_jacobian()
in sample_info/modules/ntk.py
49 15 10
def parse_network_from_config()
in sample_info/modules/nn_utils.py
40 15 3
def plot_summary_of_informativeness()
in sample_info/modules/visualizations.py
57 13 7
def main()
in sample_info/scripts/aggregate_data_summarization_results.py
44 13 0
def get_sgd_covariance_diagonal()
in sample_info/modules/sgd.py
37 12 7
def get_sgd_covariance_full()
in sample_info/modules/sgd.py
31 11 7
def inverse_hvp_lissa()
in sample_info/modules/influence_functions.py
22 10 9
def plot_histogram_of_informativeness()
in sample_info/modules/visualizations.py
38 10 9
def _parse_cifar10_cat_vs_dog()
in sample_info/modules/data_utils.py
35 9 3
def prepare_needed_items()
in sample_info/modules/ntk.py
49 9 7
def main()
in sample_info/scripts/ground_truth_effects.py
107 9 0
def _parse_mnist()
in sample_info/modules/data_utils.py
30 8 3
def _parse_cats_and_dogs()
in sample_info/modules/data_utils.py
28 8 3
def training_loss_stability()
in sample_info/modules/stability.py
32 8 8
def main()
in sample_info/scripts/data_summarization.py
118 8 0
def __init__()
in sample_info/methods/classifiers.py
26 7 6