tensorflow / tfjs-models
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 1,162 units with 18,237 lines of code in units (56.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 25 medium complex units (1,407 lines of code)
    • 96 simple units (3,587 lines of code)
    • 1,041 very simple units (13,243 lines of code)
0% | 0% | 7% | 19% | 72%
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
ts0% | 0% | 7% | 20% | 71%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
speech-commands0% | 0% | 26% | 22% | 51%
pose-detection0% | 0% | 10% | 30% | 58%
hand-pose-detection0% | 0% | 11% | 16% | 71%
body-segmentation0% | 0% | 3% | 17% | 78%
face-landmarks-detection0% | 0% | 6% | 15% | 77%
shared0% | 0% | 7% | 18% | 74%
posenet0% | 0% | 6% | 3% | 90%
body-pix0% | 0% | 1% | 13% | 85%
blazeface0% | 0% | 0% | 67% | 32%
tasks0% | 0% | 0% | 16% | 83%
qna0% | 0% | 0% | 36% | 63%
handpose0% | 0% | 0% | 16% | 83%
knn-classifier0% | 0% | 0% | 26% | 73%
mobilenet0% | 0% | 0% | 48% | 52%
coco-ssd0% | 0% | 0% | 0% | 100%
universal-sentence-encoder0% | 0% | 0% | 0% | 100%
model-playground0% | 0% | 0% | 0% | 100%
deeplab0% | 0% | 0% | 0% | 100%
toxicity0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
async collectExample()
in speech-commands/src/browser_fft_recognizer.ts
147 21 2
async listen()
in speech-commands/src/browser_fft_recognizer.ts
91 19 2
export function validateModelConfig()
in pose-detection/src/movenet/detector_utils.ts
51 19 1
export function createSsdAnchors()
in body-segmentation/src/shared/calculators/create_ssd_anchors.ts
84 18 1
export function createSsdAnchors()
in shared/calculators/create_ssd_anchors.ts
84 18 1
export function createSsdAnchors()
in pose-detection/src/shared/calculators/create_ssd_anchors.ts
84 18 1
export function createSsdAnchors()
in face-landmarks-detection/src/shared/calculators/create_ssd_anchors.ts
84 18 1
export function createSsdAnchors()
in hand-pose-detection/src/shared/calculators/create_ssd_anchors.ts
84 18 1
export function getValidWindows()
in speech-commands/src/dataset.ts
64 16 4
function validateModelConfig()
in posenet/src/posenet_model.ts
49 14 1
export function validateModelConfig()
in pose-detection/src/posenet/detector_utils.ts
49 14 1
async estimatePoses()
in pose-detection/src/blazepose_tfjs/detector.ts
90 14 3
async train()
in speech-commands/src/browser_fft_recognizer.ts
53 13 1
export function balancedTrainValSplitNumArrays()
in speech-commands/src/training_utils.ts
66 12 3
function getInputSize()
in body-segmentation/src/shared/calculators/render_util.ts
20 12 1
export function getInputSize()
in body-segmentation/src/body_pix/impl/util.ts
20 12 1
function getInputSize()
in shared/calculators/render_util.ts
20 12 1
function getInputSize()
in pose-detection/src/shared/calculators/render_util.ts
20 12 1
function getInputSize()
in face-landmarks-detection/src/shared/calculators/render_util.ts
20 12 1
export function validateModelConfig()
in hand-pose-detection/src/tfjs/detector_utils.ts
41 12 1