aws-samples / amazon-fraud-detector-python-sdk
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 43 units with 517 lines of code in units (85.2% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 7 medium size units (188 lines of code)
    • 14 small units (206 lines of code)
    • 22 very small units (123 lines of code)
0% | 0% | 36% | 39% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 36% | 39% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
frauddetector0% | 0% | 36% | 39% | 23%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def fit()
in frauddetector/frauddetector.py
41 7 8
def batch_predict()
in frauddetector/frauddetector.py
32 8 5
def create_variables()
in frauddetector/frauddetector.py
30 9 2
def __init__()
in frauddetector/frauddetector.py
22 4 8
def create_event_type()
in frauddetector/frauddetector.py
21 7 3
def create_rules()
in frauddetector/frauddetector.py
21 5 2
def deploy()
in frauddetector/frauddetector.py
21 6 3
def create_model()
in frauddetector/frauddetector.py
20 5 1
def create_labels()
in frauddetector/frauddetector.py
20 6 2
def create_entity_type()
in frauddetector/frauddetector.py
18 5 1
def predict()
in frauddetector/frauddetector.py
18 1 4
def __create_variables()
in frauddetector/profiler.py
16 4 4
def __extract_frauddetector_schema()
in frauddetector/profiler.py
16 2 6
def activate()
in frauddetector/frauddetector.py
15 5 2
def __calculate_summary_stats()
in frauddetector/profiler.py
14 1 3
def delete_variables()
in frauddetector/frauddetector.py
12 4 2
def delete_labels()
in frauddetector/frauddetector.py
12 4 2
def __check_column_in_dataframe()
in frauddetector/profiler.py
12 3 4
def delete_entity_type()
in frauddetector/frauddetector.py
11 3 1
def delete_event_type()
in frauddetector/frauddetector.py
11 3 1