awslabs / handwritten-text-recognition-for-apache-mxnet
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 185 units with 2,784 lines of code in units (81.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 8 medium complex units (358 lines of code)
    • 24 simple units (635 lines of code)
    • 153 very simple units (1,791 lines of code)
0% | 0% | 12% | 22% | 64%
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% | 12% | 22% | 64%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ocr/utils0% | 0% | 10% | 27% | 62%
ocr0% | 0% | 20% | 9% | 70%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def generate_sequences()
in ocr/utils/denoiser_utils.py
65 20 4
def run_epoch()
in ocr/word_and_line_segmentation.py
66 14 8
def ctcBeamSearch()
in ocr/utils/beam_search.py
48 14 4
def __init__()
in ocr/utils/iam_dataset.py
54 13 4
def run_epoch()
in ocr/handwriting_line_recognition.py
47 12 7
def augment_transform()
in ocr/word_and_line_segmentation.py
33 11 2
def edits1()
in ocr/utils/lexicon_search.py
9 11 2
def _get_data()
in ocr/utils/ngram_dataset.py
36 11 1
def draw_box()
in ocr/utils/draw_box_on_image.py
29 10 4
def _get_rect_overlap_percentage()
in ocr/utils/word_to_line.py
12 10 8
def _get_attention_cell()
in ocr/utils/encoder_decoder.py
31 9 6
def forward()
in ocr/utils/encoder_decoder.py
43 9 4
def decode()
in ocr/handwriting_line_recognition.py
17 9 1
def run_epoch()
in ocr/paragraph_segmentation_dcnn.py
22 8 8
def __init__()
in ocr/utils/sclite_helper.py
18 8 4
def sort_bbs_line_by_line()
in ocr/utils/word_to_line.py
53 8 2
def main()
in ocr/paragraph_segmentation_dcnn.py
29 7 1
def hybrid_forward()
in ocr/utils/encoder_decoder.py
15 7 4
def _get_bb_of_item()
in ocr/utils/iam_dataset.py
30 7 4
def _get_output_data()
in ocr/utils/iam_dataset.py
33 7 4