facebookresearch / ego-topo
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 259 units with 3,046 lines of code in units (74.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 14 medium complex units (451 lines of code)
    • 27 simple units (610 lines of code)
    • 218 very simple units (1,985 lines of code)
0% | 0% | 14% | 20% | 65%
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% | 14% | 20% | 65%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
anticipation/anticipation/datasets0% | 0% | 32% | 25% | 42%
build_graph/tools0% | 0% | 20% | 23% | 56%
build_graph0% | 0% | 24% | 27% | 47%
build_graph/localization_network0% | 0% | 14% | 28% | 56%
build_graph/tools/superpoint0% | 0% | 23% | 0% | 76%
anticipation/anticipation/runner0% | 0% | 10% | 13% | 76%
build_graph/data0% | 0% | 0% | 33% | 66%
anticipation/anticipation/tools0% | 0% | 0% | 61% | 38%
build_graph/utils0% | 0% | 0% | 10% | 89%
anticipation/anticipation/models0% | 0% | 0% | 0% | 100%
anticipation/anticipation/utils0% | 0% | 0% | 0% | 100%
anticipation/anticipation/configs0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def load_annotations_anticipation()
in anticipation/anticipation/datasets/epic_future_labels.py
31 19 2
def visits_to_labels()
in anticipation/anticipation/datasets/epic_future_labels.py
25 17 2
def load_annotations_recognition()
in anticipation/anticipation/datasets/epic_future_labels.py
30 16 2
def run()
in build_graph/tools/generate_sp_matches.py
29 15 0
def drawMatches()
in build_graph/tools/viz_sp_matches.py
27 14 6
def __init__()
in anticipation/anticipation/datasets/epic_future_labels.py
73 13 10
def get_node_feats()
in anticipation/anticipation/datasets/epic_future_labels.py
33 13 3
def viz()
in build_graph/build.py
49 12 6
def nms_fast()
in build_graph/tools/superpoint/model.py
32 12 5
def __init__()
in build_graph/localization_network/dataset.py
23 12 3
def build()
in build_graph/build.py
21 11 1
def run()
in build_graph/tools/generate_sp_descriptors.py
24 11 0
def __init__()
in build_graph/localization_network/dataset.py
23 11 3
def run()
in anticipation/anticipation/runner/runner.py
31 11 5
def generate_pairwise_clip_distance_epic()
in build_graph/tools/generate_r152_neighbors.py
25 10 1
def far_interaction_same_kitchen_visually_dissimilar()
in build_graph/localization_network/dataset.py
19 10 5
def train()
in build_graph/localization_network/train.py
34 10 6
def parse_annotations()
in build_graph/data/epic.py
34 10 1
def get_future_labels()
in anticipation/anticipation/datasets/epic_future_labels.py
21 10 4
def main()
in anticipation/anticipation/tools/train_recognizer.py
41 9 0