tensorflow / probability
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 8,263 units with 86,634 lines of code in units (38.9% of code).
    • 0 very complex units (0 lines of code)
    • 12 complex units (1,172 lines of code)
    • 190 medium complex units (9,523 lines of code)
    • 549 simple units (16,423 lines of code)
    • 7,512 very simple units (59,516 lines of code)
0% | 1% | 10% | 18% | 68%
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% | 1% | 10% | 18% | 68%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tensorflow_probability/python0% | 1% | 11% | 19% | 68%
tensorflow_probability/substrates0% | 94% | 0% | 0% | 5%
spinoffs/oryx0% | 1% | 11% | 15% | 71%
discussion/turnkey_inference_candidate0% | 0% | 100% | 0% | 0%
spinoffs/fun_mc0% | 0% | 2% | 10% | 87%
spinoffs/inference_gym0% | 0% | 0% | 18% | 81%
discussion/neutra0% | 0% | 0% | 0% | 100%
discussion/pathfinder0% | 0% | 0% | 0% | 100%
tensorflow_probability/tools0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _parameter_control_dependencies()
in tensorflow_probability/python/bijectors/pad.py
78 37 2
def build()
in tensorflow_probability/python/distributions/pixel_cnn.py
152 34 2
def solve()
in tensorflow_probability/python/internal/backend/numpy/gen/linear_operator_block_lower_triangular.py
68 34 5
def main()
in tensorflow_probability/substrates/meta/rewrite.py
141 31 1
def _execute_model()
in tensorflow_probability/python/distributions/joint_distribution.py
88 31 2
def init_near_unconstrained_zero()
in tensorflow_probability/python/experimental/mcmc/initialization.py
84 31 8
def diag_jacobian()
in tensorflow_probability/python/math/diag_jacobian.py
89 29 6
def unzip_to_init_apply_subjaxprs()
in spinoffs/oryx/oryx/core/interpreters/unzip.py
62 27 4
def _parameter_control_dependencies()
in tensorflow_probability/python/distributions/batch_concat.py
65 27 2
def one_step()
in tensorflow_probability/python/mcmc/replica_exchange_mc.py
139 26 4
def __init__()
in tensorflow_probability/python/sts/components/sum.py
103 26 9
def __init__()
in tensorflow_probability/python/bijectors/glow.py
103 26 4
def __init__()
in tensorflow_probability/python/internal/backend/numpy/gen/linear_operator_low_rank_update.py
81 25 11
def percentile()
in tensorflow_probability/python/stats/quantiles.py
90 24 8
def arg_is_blockwise()
in tensorflow_probability/python/internal/backend/numpy/gen/linear_operator_util.py
26 24 3
def _parameter_control_dependencies()
in tensorflow_probability/python/bijectors/rational_quadratic_spline.py
73 24 2
def _value_and_grad_impl()
in tensorflow_probability/python/math/gradient.py
39 23 8
def _reshape_for_efficiency()
in tensorflow_probability/python/internal/backend/numpy/gen/linear_operator_util.py
50 23 6
def solve()
in tensorflow_probability/python/internal/backend/numpy/gen/linear_operator_block_diag.py
67 23 5
def _extract_init_kwargs()
in tensorflow_probability/python/internal/auto_composite_tensor.py
42 22 2