tensorflow / adanet
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 508 units with 6,757 lines of code in units (85.2% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (547 lines of code)
    • 20 medium complex units (1,280 lines of code)
    • 28 simple units (754 lines of code)
    • 457 very simple units (4,176 lines of code)
0% | 8% | 18% | 11% | 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% | 8% | 18% | 11% | 61%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
adanet/core0% | 13% | 23% | 9% | 54%
adanet/ensemble0% | 0% | 27% | 7% | 64%
research/improve_nas0% | 0% | 8% | 21% | 69%
adanet/subnetwork0% | 0% | 64% | 0% | 35%
adanet/distributed0% | 0% | 0% | 40% | 59%
adanet/experimental0% | 0% | 0% | 7% | 92%
adanet/autoensemble0% | 0% | 0% | 0% | 100%
adanet/tf_compat0% | 0% | 0% | 0% | 100%
adanet/replay0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def build_ensemble_spec()
in adanet/core/ensemble_builder.py
218 44 13
def build_iteration()
in adanet/core/iteration.py
237 41 14
def train()
in adanet/core/estimator.py
92 39 6
def _build_nasnet_base()
in research/improve_nas/trainer/nasnet.py
81 25 9
def materialize_subnetwork_reports()
in adanet/core/report_materializer.py
58 20 5
def __init__()
in adanet/core/estimator.py
123 18 28
def _best_export_outputs()
in adanet/core/iteration.py
51 18 5
def _get_best_ensemble_index()
in adanet/core/estimator.py
76 17 4
def _create_hooks()
in adanet/core/iteration.py
46 17 8
def _apply_conv_operation()
in research/improve_nas/trainer/nasnet_utils.py
33 17 6
def train_and_evaluate_estimator()
in adanet/core/estimator_distributed_test_runner.py
141 15 0
def _build_weighted_subnetwork_helper()
in adanet/ensemble/weighted.py
45 15 6
def __new__()
in adanet/subnetwork/report.py
55 14 4
def check_eventfile_for_keyword()
in adanet/core/testing_utils.py
28 14 2
def build_ensemble()
in adanet/ensemble/weighted.py
78 14 11
def _create_iteration()
in adanet/core/estimator.py
83 13 9
def build_subnetwork_spec()
in adanet/core/ensemble_builder.py
91 13 9
def _create_tpu_train_op()
in adanet/core/iteration.py
26 13 7
def best_eval_metrics_tuple()
in adanet/core/eval_metrics.py
58 13 3
def evaluate()
in adanet/core/evaluator.py
25 13 3