awslabs / sagemaker-graph-fraud-detection
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 96 units with 1,183 lines of code in units (54.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 13 simple units (260 lines of code)
    • 83 very simple units (923 lines of code)
0% | 0% | 0% | 21% | 78%
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% | 0% | 21% | 78%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection0% | 0% | 0% | 30% | 69%
source/sagemaker/sagemaker_graph_fraud_detection/container_build0% | 0% | 0% | 56% | 43%
source/lambda/graph-modelling0% | 0% | 0% | 13% | 86%
source/sagemaker/data-preprocessing0% | 0% | 0% | 14% | 85%
source/lambda/data-preprocessing0% | 0% | 0% | 0% | 100%
source/sagemaker/baselines0% | 0% | 0% | 0% | 100%
deployment/solution-assistant/src0% | 0% | 0% | 0% | 100%
source/sagemaker/sagemaker_graph_fraud_detection0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def forward()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/model/pytorch.py
9 9 3
def forward()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/model/mxnet.py
9 9 3
def read_edges()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/data.py
34 9 2
def construct_graph()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/graph.py
34 8 5
def forward()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/model/mxnet.py
10 8 3
def get_model()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/train_dgl_mxnet_entry_point.py
52 7 6
def parse_edgelist()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/data.py
21 7 5
def verify_modelling_inputs()
in source/lambda/graph-modelling/index.py
16 6 1
def create_homogeneous_edgelist()
in source/sagemaker/data-preprocessing/graph_data_preprocessor.py
10 6 2
def forward()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/model/pytorch.py
8 6 3
def __init__()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/model/mxnet.py
14 6 8
def _get_mask()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/data.py
11 6 5
def log_stream()
in source/sagemaker/sagemaker_graph_fraud_detection/container_build/logs.py
32 6 4
def __init__()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/model/pytorch.py
12 5 7
def sample_block()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/sampler.py
11 5 2
def get_edgelists()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/graph.py
6 4 2
def train()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/train_dgl_mxnet_entry_point.py
25 4 19
def __init__()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/model/mxnet.py
6 4 4
def get_metrics()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/utils.py
22 4 5
def sample_block()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/sampler.py
15 4 2