facebookresearch / irt-leaderboard
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 431 units with 6,771 lines of code in units (64.8% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (106 lines of code)
    • 10 medium complex units (585 lines of code)
    • 34 simple units (999 lines of code)
    • 386 very simple units (5,081 lines of code)
0% | 1% | 8% | 14% | 75%
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% | 9% | 15% | 72%
ts0% | 0% | 0% | 35% | 64%
tsx0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
leaderboard0% | 2% | 8% | 16% | 72%
scripts0% | 0% | 21% | 19% | 58%
leaderboard/www0% | 0% | 19% | 23% | 56%
frontend/src0% | 0% | 0% | 4% | 95%
leaderboard/analysis0% | 0% | 0% | 18% | 81%
leaderboard/irt0% | 0% | 0% | 12% | 87%
leaderboard/irt/pyirt0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def generate_examples()
in leaderboard/linear.py
106 30 1
def ablation_plot()
in leaderboard/plots.py
138 23 2
def _fetch_leaderboard()
in scripts/competitiond.py
64 16 1
def _process_vw_argument()
in scripts/vw-hyperopt.py
48 16 4
def main()
in leaderboard/squad_eval_v2.py
37 13 0
def load_irt()
in leaderboard/www/app.py
59 13 1
def run_test()
in leaderboard/stats.py
81 12 2
def string_to_pyll()
in scripts/vw-hyperopt.py
38 12 1
def requires()
in leaderboard/tasks.py
21 11 1
def plot_irt_acc()
in leaderboard/plots.py
68 11 2
def validation_metric_vw()
in scripts/vw-hyperopt.py
31 11 1
def mcnemar_test()
in leaderboard/stats.py
20 10 2
def load_quizbowl()
in leaderboard/data.py
18 10 4
def from_irt_results()
in leaderboard/data.py
39 10 2
def from_irt_results()
in leaderboard/data.py
39 10 2
def get_raw_scores()
in leaderboard/squad_eval_v2.py
17 9 2
def rank_compute_bootstrap_ci()
in leaderboard/plots.py
56 9 3
def simulate()
in leaderboard/power.py
45 9 5
def generate_description()
in scripts/competitiond.py
37 9 0
def get_hyperparam_string()
in scripts/vw-hyperopt.py
12 9 2