microsoft / dowhy
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 367 units with 5,805 lines of code in units (91.0% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (144 lines of code)
    • 30 medium complex units (1,551 lines of code)
    • 55 simple units (1,590 lines of code)
    • 281 very simple units (2,520 lines of code)
0% | 2% | 26% | 27% | 43%
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% | 2% | 26% | 27% | 43%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
dowhy0% | 6% | 24% | 31% | 38%
dowhy/causal_estimators0% | 0% | 37% | 31% | 30%
dowhy/causal_refuters0% | 0% | 43% | 33% | 22%
dowhy/causal_identifiers0% | 0% | 31% | 11% | 57%
dowhy/api0% | 0% | 56% | 0% | 43%
dowhy/utils0% | 0% | 5% | 25% | 69%
dowhy/interpreters0% | 0% | 0% | 26% | 73%
dowhy/do_samplers0% | 0% | 0% | 0% | 100%
dowhy/graph_learners0% | 0% | 0% | 0% | 100%
dowhy/data_transformers0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def linear_dataset()
in dowhy/datasets.py
144 48 15
def _path_search_util()
in dowhy/causal_identifiers/backdoor.py
44 24 9
def identify_effect()
in dowhy/causal_identifiers/id_identifier.py
82 24 5
def include_simulated_confounder()
in dowhy/causal_refuters/add_unobserved_common_cause.py
117 23 3
def _estimate_effect()
in dowhy/causal_estimators/distance_matching_estimator.py
106 21 1
def __init__()
in dowhy/causal_estimator.py
52 20 13
def _estimate_effect()
in dowhy/causal_estimators/propensity_score_stratification_estimator.py
66 19 1
def build_graph()
in dowhy/causal_graph.py
38 19 5
def refute_estimate()
in dowhy/causal_refuters/add_unobserved_common_cause.py
117 19 1
def choose_variables()
in dowhy/causal_refuter.py
41 18 2
def __init__()
in dowhy/causal_estimators/distance_matching_estimator.py
38 17 3
def __init__()
in dowhy/causal_graph.py
67 17 10
def _estimate_effect()
in dowhy/causal_estimators/econml.py
58 15 1
def identify_backdoor()
in dowhy/causal_identifier.py
54 15 5
def estimate_effect()
in dowhy/causal_model.py
81 15 12
def do()
in dowhy/api/causal_data_frame.py
39 14 12
39 14 5
def _build_features()
in dowhy/causal_estimators/regression_estimator.py
36 14 3
def find_valid_adjustment_sets()
in dowhy/causal_identifier.py
31 14 10
def __str__()
in dowhy/causal_identifier.py
35 14 3