awslabs / privacy-preserving-xgboost-inference
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 43 units with 237 lines of code in units (86.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (37 lines of code)
    • 2 simple units (32 lines of code)
    • 40 very simple units (168 lines of code)
0% | 0% | 15% | 13% | 70%
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% | 0% | 15% | 13% | 70%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/ppxgboost0% | 0% | 15% | 13% | 70%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def parse_node_in_tree()
in src/ppxgboost/BoosterParser.py
37 23 4
def enc_input_vector()
in src/ppxgboost/PPBooster.py
19 9 5
def enc_tree_node()
in src/ppxgboost/PPBooster.py
13 6 5
def predict_single_input_multiclass()
in src/ppxgboost/PPBooster.py
9 5 3
def client_side_multiclass_compute()
in src/ppxgboost/PPBooster.py
9 5 1
def model_to_trees()
in src/ppxgboost/BoosterParser.py
8 4 2
def predict_binary()
in src/ppxgboost/PPBooster.py
5 3 3
def client_decrypt_prediction_multiclass()
in src/ppxgboost/PPBooster.py
9 3 2
def eval()
in src/ppxgboost/BoosterParser.py
7 3 2
def random_string()
in src/ppxgboost/PPBooster.py
3 2 1
def hmac_feature()
in src/ppxgboost/PPBooster.py
6 2 2
def enc_xgboost_model()
in src/ppxgboost/PPBooster.py
7 2 3
def predict_single_input_binary()
in src/ppxgboost/PPBooster.py
6 2 3
def predict_multiclass()
in src/ppxgboost/PPBooster.py
6 2 3
def eval()
in src/ppxgboost/BoosterParser.py
4 2 2
def node_to_string()
in src/ppxgboost/BoosterParser.py
5 2 2
def node_to_string()
in src/ppxgboost/BoosterParser.py
9 2 2
def assert_ciphertext()
in src/ppxgboost/PaillierAPI.py
3 2 1
def __init__()
in src/ppxgboost/PPBooster.py
3 1 2
def set_min()
in src/ppxgboost/PPBooster.py
2 1 2