CasualML
Conditional Complexity

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 285 units with 4,927 lines of code in units (91.4% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (364 lines of code)
    • 16 medium complex units (897 lines of code)
    • 32 simple units (1,014 lines of code)
    • 234 very simple units (2,652 lines of code)
0% | 7% | 18% | 20% | 53%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
py0% | 7% | 18% | 20% | 53%
Legend:
51+
26-50
11-25
6-10
1-5
Conditional Complexity per Logical Component
primary logical decomposition
causalml/inference0% | 12% | 21% | 21% | 44%
causalml/metrics0% | 0% | 20% | 23% | 56%
causalml/dataset0% | 0% | 19% | 22% | 58%
causalml0% | 0% | 15% | 17% | 66%
causalml/feature_selection0% | 0% | 0% | 28% | 71%
causalml/optimize0% | 0% | 0% | 0% | 100%
Legend:
51+
26-50
11-25
6-10
1-5
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
def growDecisionTreeFrom()
in causalml/inference/tree/models.py
182 35 11
def cat_continuous()
in causalml/inference/tree/utils.py
75 28 2
def pruneTree()
in causalml/inference/tree/models.py
107 26 11
def make_uplift_classification()
in causalml/dataset/classification.py
100 20 30
def uplift_tree_plot()
in causalml/inference/tree/plot.py
121 19 2
def classify()
in causalml/inference/tree/models.py
88 15 4
def check_table_one()
in causalml/match.py
22 15 6
def get_tmlegain()
in causalml/metrics/visualize.py
48 14 5
def get_tmleqini()
in causalml/metrics/visualize.py
49 14 5
def fit()
in causalml/inference/meta/xlearner.py
49 13 5
def fit()
in causalml/inference/meta/xlearner.py
49 13 5
def fit()
in causalml/inference/meta/rlearner.py
64 12 6
def plot()
in causalml/metrics/sensitivity.py
41 11 6
def fit()
in causalml/inference/meta/rlearner.py
47 11 6
def fit()
in causalml/inference/meta/rlearner.py
47 11 6
def predict()
in causalml/inference/meta/xlearner.py
41 11 7
def predict()
in causalml/inference/meta/xlearner.py
41 11 7
def estimate_ate()
in causalml/inference/meta/tmle.py
57 11 7
def search_best_match()
in causalml/match.py
33 11 2
def get_qini()
in causalml/metrics/visualize.py
35 10 6
def get_synthetic_summary_holdout()
in causalml/dataset/synthetic.py
47 10 4
def get_cumlift()
in causalml/metrics/visualize.py
32 9 5
def __init__()
in causalml/inference/meta/xlearner.py
32 9 8
def estimate_ate()
in causalml/inference/meta/xlearner.py
56 9 8
def match()
in causalml/match.py
47 9 4
def distr_plot_single_sim()
in causalml/dataset/synthetic.py
24 8 8
def load_data()
in causalml/features.py
14 8 3
def fillTree()
in causalml/inference/tree/models.py
21 8 5
def predict()
in causalml/inference/tree/models.py
44 8 3
def estimate_ate()
in causalml/inference/meta/rlearner.py
47 8 8
def get_synthetic_preds()
in causalml/dataset/synthetic.py
26 7 3
def predict()
in causalml/inference/tree/models.py
38 7 3
def normI()
in causalml/inference/tree/models.py
48 7 6
def predict()
in causalml/inference/meta/tlearner.py
26 7 6
def predict()
in causalml/inference/meta/tlearner.py
25 7 6
def fit_predict()
in causalml/inference/meta/rlearner.py
33 7 9
def fit_predict()
in causalml/inference/meta/xlearner.py
36 7 10
def __init__()
in causalml/inference/meta/xlearner.py
26 7 9
def predict()
in causalml/inference/meta/slearner.py
27 7 6
def predict()
in causalml/inference/meta/slearner.py
27 7 6
def plot_tmlegain()
in causalml/metrics/visualize.py
27 6 5
def plot_tmleqini()
in causalml/metrics/visualize.py
27 6 5
def get_std_diffs()
in causalml/metrics/visualize.py
38 6 5
def get_synthetic_auuc()
in causalml/dataset/synthetic.py
23 6 6
def _GetNodeSummary()
in causalml/feature_selection/filters.py
19 6 4
def _filter_D_one_feature()
in causalml/feature_selection/filters.py
36 6 8
def uplift_tree_string()
in causalml/inference/tree/plot.py
32 6 2
def __init__()
in causalml/inference/tree/models.py
17 6 14
def divideSet()
in causalml/inference/tree/models.py
25 6 6
def estimate_ate()
in causalml/inference/meta/slearner.py
46 6 8