aws-samples / amazon-fraud-detector-python-sdk
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 517 lines of code in units (85.2% 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)
    • 6 simple units (165 lines of code)
    • 37 very simple units (352 lines of code)
0% | 0% | 0% | 31% | 68%
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% | 31% | 68%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
frauddetector0% | 0% | 0% | 31% | 68%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def create_variables()
in frauddetector/frauddetector.py
30 9 2
def batch_predict()
in frauddetector/frauddetector.py
32 8 5
def create_event_type()
in frauddetector/frauddetector.py
21 7 3
def fit()
in frauddetector/frauddetector.py
41 7 8
def create_labels()
in frauddetector/frauddetector.py
20 6 2
def deploy()
in frauddetector/frauddetector.py
21 6 3
def create_model()
in frauddetector/frauddetector.py
20 5 1
def create_entity_type()
in frauddetector/frauddetector.py
18 5 1
def activate()
in frauddetector/frauddetector.py
15 5 2
def create_rules()
in frauddetector/frauddetector.py
21 5 2
def __init__()
in frauddetector/frauddetector.py
22 4 8
def delete_variables()
in frauddetector/frauddetector.py
12 4 2
def delete_labels()
in frauddetector/frauddetector.py
12 4 2
def model_status()
in frauddetector/frauddetector.py
8 4 1
def __create_variables()
in frauddetector/profiler.py
16 4 4
def delete_entity_type()
in frauddetector/frauddetector.py
11 3 1
def delete_event_type()
in frauddetector/frauddetector.py
11 3 1
def outcomes()
in frauddetector/frauddetector.py
5 3 1
def delete_rules()
in frauddetector/frauddetector.py
8 3 2
def __create_labels()
in frauddetector/profiler.py
6 3 3