facebookresearch / SentEval
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 97 units with 1,514 lines of code in units (79.0% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (59 lines of code)
    • 2 medium complex units (77 lines of code)
    • 17 simple units (617 lines of code)
    • 77 very simple units (761 lines of code)
0% | 3% | 5% | 40% | 50%
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% | 3% | 5% | 40% | 50%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
senteval0% | 6% | 4% | 35% | 53%
senteval/tools0% | 0% | 6% | 47% | 46%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def eval()
in senteval/engine.py
59 28 2
def get_optimizer()
in senteval/utils.py
37 13 1
def run()
in senteval/tools/validation.py
40 12 1
def __init__()
in senteval/engine.py
20 10 4
def run()
in senteval/sts.py
38 9 3
def __init__()
in senteval/tools/classifier.py
27 9 8
def run()
in senteval/tools/ranking.py
73 9 1
def run()
in senteval/tools/validation.py
46 9 1
def run()
in senteval/tools/validation.py
44 9 1
def run()
in senteval/snli.py
39 9 3
def run()
in senteval/sick.py
50 9 3
def run()
in senteval/tools/relatedness.py
25 8 1
def loadFile()
in senteval/sts.py
20 7 2
def trainepoch()
in senteval/tools/ranking.py
39 7 6
def run()
in senteval/sick.py
44 7 3
def run()
in senteval/trec.py
36 7 3
def run()
in senteval/mrpc.py
41 7 3
def fit()
in senteval/tools/classifier.py
20 6 6
def i2t()
in senteval/tools/ranking.py
31 6 3
def loadFile()
in senteval/rank.py
24 6 2