facebookresearch / deepmeg-recurrent-encoder
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 71 units with 1,967 lines of code in units (92.6% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (133 lines of code)
    • 8 medium complex units (663 lines of code)
    • 14 simple units (359 lines of code)
    • 48 very simple units (812 lines of code)
0% | 6% | 33% | 18% | 41%
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% | 6% | 33% | 18% | 41%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
neural0% | 10% | 27% | 22% | 39%
neural/linear0% | 0% | 43% | 11% | 44%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def load_torch_megs()
in neural/dataset.py
133 38 6
def predict()
in neural/linear/lin_model_template.py
64 24 5
def main()
in neural/__main__.py
132 20 0
def eval_lin_models()
in neural/linear/__main__.py
108 18 9
def train_eval_model()
in neural/train.py
84 18 10
def fit()
in neural/linear/arx.py
53 17 3
def extract_subject()
in neural/extraction.py
127 17 1
def main()
in neural/linear/__main__.py
47 16 0
def plot_weights()
in neural/linear/lin_model_template.py
48 11 3
def make_repo_from_parser()
in neural/__main__.py
30 10 2
def R_score_v2()
in neural/linear/stats.py
21 9 5
def _add_stim_id()
in neural/utils_mous.py
40 9 3
def __init__()
in neural/model.py
55 8 13
def match_list()
in neural/utils_mous.py
24 8 3
def plot_weights()
in neural/linear/receptive_field.py
32 7 3
def formulate_regression()
in neural/linear/lin_model_template.py
32 7 3
def create_directory()
in neural/utils.py
7 7 2
def create_directory()
in neural/utils_mous.py
11 7 2
def plot_score()
in neural/visuals.py
18 7 5
def forward()
in neural/model.py
25 6 4