facebookresearch / Addressing-the-Topological-Defects-of-Disentanglement
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 229 units with 2,522 lines of code in units (74.7% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (194 lines of code)
    • 0 medium complex units (0 lines of code)
    • 9 simple units (227 lines of code)
    • 219 very simple units (2,101 lines of code)
0% | 7% | 0% | 9% | 83%
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% | 7% | 0% | 9% | 83%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
complex_shift_operator0% | 100% | 0% | 0% | 0%
ROOT0% | 0% | 0% | 9% | 90%
datasets0% | 0% | 0% | 9% | 90%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def main()
in complex_shift_operator/__main__.py
194 32 1
def save_all_best_validation()
in save_best_validation.py
12 9 1
def train()
in cci_variational_autoencoder.py
51 8 4
39 7 7
def generate_images_from_coords()
in datasets/data_utils.py
27 7 4
def return_shifts()
in complex_shift_autoencoder.py
15 7 2
18 6 4
def transform()
in datasets/transformations.py
17 6 2
def train()
in autoencoder.py
33 6 4
def save_best_validation_helper()
in save_best_validation.py
15 6 2
def get_experiment_function()
in run_experiments_real.py
29 5 1
def __init__()
in latent_operators.py
18 5 6
def save_plots()
in autoencoder.py
21 5 2
17 4 5
7 4 2
def get_params()
in run_experiments_real.py
11 4 1
def get_n_transformations()
in run_experiments_real.py
10 4 1
def translate_batch()
in latent_operators.py
14 4 3
def translate()
in latent_operators.py
8 4 3
34 4 3