tensorflow / lattice
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 331 units with 8,007 lines of code in units (94.1% of code).
    • 2 very complex units (320 lines of code)
    • 4 complex units (339 lines of code)
    • 55 medium complex units (2,761 lines of code)
    • 68 simple units (2,014 lines of code)
    • 202 very simple units (2,573 lines of code)
3% | 4% | 34% | 25% | 32%
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
py3% | 4% | 34% | 25% | 32%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tensorflow_lattice/python3% | 4% | 34% | 25% | 32%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def verify_hyperparameters()
in tensorflow_lattice/python/lattice_lib.py
183 76 17
def verify_hyperparameters()
in tensorflow_lattice/python/linear_lib.py
137 64 9
def _get_rtl_structure()
in tensorflow_lattice/python/rtl_layer.py
80 30 2
def assert_constraints()
in tensorflow_lattice/python/lattice_lib.py
169 28 12
def torsion_regularizer()
in tensorflow_lattice/python/lattice_lib.py
41 27 4
def _verify_ensemble_config()
in tensorflow_lattice/python/premade_lib.py
49 26 1
def call()
in tensorflow_lattice/python/pwl_calibration_layer.py
77 25 2
def verify_hyperparameters()
in tensorflow_lattice/python/pwl_calibration_lib.py
51 25 9
def __init__()
in tensorflow_lattice/python/lattice_layer.py
97 24 20
def build()
in tensorflow_lattice/python/linear_layer.py
57 24 2
def draw_model_graph()
in tensorflow_lattice/python/visualization.py
65 22 4
def compute_keypoints()
in tensorflow_lattice/python/premade_lib.py
61 22 9
def project_by_dykstra()
in tensorflow_lattice/python/lattice_lib.py
147 22 11
def laplacian_regularizer()
in tensorflow_lattice/python/lattice_lib.py
33 22 4
def create_kernel_initializer()
in tensorflow_lattice/python/lattice_layer.py
65 22 9
def verify_hyperparameters()
in tensorflow_lattice/python/kronecker_factored_lattice_lib.py
43 22 7
def __init__()
in tensorflow_lattice/python/pwl_calibration_layer.py
108 21 19
def verify_hyperparameters()
in tensorflow_lattice/python/rtl_lib.py
55 21 8
def _finalize_model_structure()
in tensorflow_lattice/python/estimators.py
61 20 11
def _get_final_crystal_lattices()
in tensorflow_lattice/python/premade_lib.py
101 20 4