tensorflow / model-remediation
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 77 units with 965 lines of code in units (78.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (219 lines of code)
    • 9 simple units (270 lines of code)
    • 64 very simple units (476 lines of code)
0% | 0% | 22% | 27% | 49%
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% | 22% | 27% | 49%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tensorflow_model_remediation/min_diff/keras/utils0% | 0% | 53% | 35% | 11%
tensorflow_model_remediation/min_diff/keras/models0% | 0% | 38% | 12% | 49%
tensorflow_model_remediation/tools/tutorials_utils/uci0% | 0% | 0% | 57% | 42%
tensorflow_model_remediation/min_diff/losses0% | 0% | 0% | 19% | 80%
tensorflow_model_remediation/tools0% | 0% | 0% | 92% | 7%
tensorflow_model_remediation/min_diff/losses/kernels0% | 0% | 0% | 0% | 100%
tensorflow_model_remediation/tools/tutorials_utils0% | 0% | 0% | 0% | 100%
tensorflow_model_remediation/common0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _conform_weights_to_losses()
in tensorflow_model_remediation/min_diff/keras/models/min_diff_model.py
34 20 3
def pack_min_diff_data()
in tensorflow_model_remediation/min_diff/keras/utils/input_utils.py
55 18 4
def __init__()
in tensorflow_model_remediation/min_diff/keras/models/min_diff_model.py
55 15 6
def build_min_diff_dataset()
in tensorflow_model_remediation/min_diff/keras/utils/input_utils.py
75 13 2
def validate_min_diff_structure()
in tensorflow_model_remediation/min_diff/keras/utils/structure_utils.py
25 10 3
def get_config()
in tensorflow_model_remediation/min_diff/keras/models/min_diff_model.py
21 9 1
def get_uci_model()
in tensorflow_model_remediation/tools/tutorials_utils/uci/utils.py
77 9 1
def _assert_same_min_diff_structure()
in tensorflow_model_remediation/min_diff/keras/utils/structure_utils.py
32 7 2
def _call_original_model()
in tensorflow_model_remediation/min_diff/keras/models/min_diff_model.py
7 7 4
def __call__()
in tensorflow_model_remediation/min_diff/losses/base_loss.py
42 7 4
def execute()
in tensorflow_model_remediation/tools/build_api_docs.py
37 7 4
def _pack_min_diff_sequence_as()
in tensorflow_model_remediation/min_diff/keras/utils/structure_utils.py
18 6 2
def _is_min_diff_element()
in tensorflow_model_remediation/min_diff/keras/utils/structure_utils.py
11 6 2
def _flatten_min_diff_structure()
in tensorflow_model_remediation/min_diff/keras/utils/structure_utils.py
6 5 2
def compute_min_diff_loss()
in tensorflow_model_remediation/min_diff/keras/models/min_diff_model.py
16 5 4
def call()
in tensorflow_model_remediation/min_diff/keras/models/min_diff_model.py
12 5 4
def _get_kernel()
in tensorflow_model_remediation/min_diff/losses/kernels/kernel_utils.py
16 5 3
def _get_loss()
in tensorflow_model_remediation/min_diff/losses/loss_utils.py
16 5 3
def _compute_single_min_diff_loss()
in tensorflow_model_remediation/min_diff/keras/models/min_diff_model.py
35 4 7
def test_step()
in tensorflow_model_remediation/min_diff/keras/models/min_diff_model.py
8 4 4