aws-samples / amazon-neptune-ml-use-cases
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 32 units with 549 lines of code in units (94.0% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (111 lines of code)
    • 3 medium complex units (110 lines of code)
    • 2 simple units (70 lines of code)
    • 26 very simple units (258 lines of code)
0% | 20% | 20% | 12% | 46%
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% | 20% | 20% | 12% | 46%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
credit-card-fraud-detection0% | 20% | 20% | 12% | 46%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def setup_pretrained_endpoints()
in credit-card-fraud-detection/neptune_ml_utils.py
111 31 7
def delete_pretrained_endpoints()
in credit-card-fraud-detection/neptune_ml_utils.py
21 12 1
def __process_ratings_users()
in credit-card-fraud-detection/neptune_ml_utils.py
46 12 1
def delete_pretrained_data()
in credit-card-fraud-detection/neptune_ml_utils.py
43 11 5
def get_node_to_idx_mapping()
in credit-card-fraud-detection/neptune_ml_utils.py
25 10 4
def __process_movies_genres()
in credit-card-fraud-detection/neptune_ml_utils.py
45 7 1
def get_export_service_host()
in credit-card-fraud-detection/neptune_ml_utils.py
12 4 0
def get_predictions()
in credit-card-fraud-detection/neptune_ml_utils.py
12 4 3
def __download_and_unzip()
in credit-card-fraud-detection/neptune_ml_utils.py
12 4 1
def __get_neptune_ml_role()
in credit-card-fraud-detection/neptune_ml_utils.py
10 4 1
def delete_endpoint()
in credit-card-fraud-detection/neptune_ml_utils.py
13 3 2
def get_embeddings()
in credit-card-fraud-detection/neptune_ml_utils.py
10 3 2
def get_performance_metrics()
in credit-card-fraud-detection/neptune_ml_utils.py
11 3 2
def __upload_to_s3()
in credit-card-fraud-detection/neptune_ml_utils.py
9 3 2
def signed_request()
in credit-card-fraud-detection/neptune_ml_utils.py
16 2 6
def load_configuration()
in credit-card-fraud-detection/neptune_ml_utils.py
10 2 0
def check_ml_enabled()
in credit-card-fraud-detection/neptune_ml_utils.py
6 2 0
def prepare_movielens_data()
in credit-card-fraud-detection/neptune_ml_utils.py
5 2 1
def setup_pretrained_endpoints()
in credit-card-fraud-detection/neptune_ml_utils.py
12 2 6
def get_neptune_ml_job_output_location()
in credit-card-fraud-detection/neptune_ml_utils.py
11 2 2