tensorflow / tfx-addons
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 56 units with 571 lines of code in units (28.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (43 lines of code)
    • 5 simple units (89 lines of code)
    • 50 very simple units (439 lines of code)
0% | 0% | 7% | 15% | 76%
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% | 7% | 15% | 76%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tfx_addons/feature_selection0% | 0% | 57% | 9% | 33%
tfx_addons/xgboost_evaluator0% | 0% | 0% | 47% | 52%
tfx_addons/sampling0% | 0% | 0% | 34% | 65%
tfx_addons/sampling/example0% | 0% | 0% | 0% | 100%
tfx_addons/mlmd_client0% | 0% | 0% | 0% | 100%
tfx_addons/schema_curation/example0% | 0% | 0% | 0% | 100%
tfx_addons/schema_curation/component0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def FeatureSelection()
in tfx_addons/feature_selection/component.py
43 12 4
def setup()
in tfx_addons/xgboost_evaluator/xgboost_predict_extractor.py
24 10 1
def process()
in tfx_addons/xgboost_evaluator/xgboost_predict_extractor.py
20 10 2
def _data_preprocessing()
in tfx_addons/feature_selection/component.py
7 6 2
def filter_null()
in tfx_addons/sampling/executor.py
9 6 3
def sample_examples()
in tfx_addons/sampling/executor.py
29 6 3
def trainer_fn()
in tfx_addons/sampling/example/sampler_utils.py
46 5 2
def _create_pipeline()
in tfx_addons/schema_curation/example/taxi_example_local.py
16 4 4
def extract_model_specs()
in tfx_addons/xgboost_evaluator/xgboost_predict_extractor.py
8 4 1
def _generate_elements()
in tfx_addons/sampling/executor.py
12 4 2
def sample_data()
in tfx_addons/sampling/executor.py
12 4 4
def get_artifact_by_type_name()
in tfx_addons/mlmd_client/client.py
6 3 2
def _get_data_from_tfrecords()
in tfx_addons/feature_selection/component.py
12 3 1
def _update_example()
in tfx_addons/feature_selection/component.py
7 3 2
def _get_file_list()
in tfx_addons/feature_selection/component.py
6 3 1
def _create_pipeline()
in tfx_addons/sampling/example/sampler_pipeline_local.py
82 3 7
def _fill_in_missing()
in tfx_addons/sampling/example/sampler_utils.py
8 3 1
def _build_estimator()
in tfx_addons/sampling/example/sampler_utils.py
10 3 3
def _mlmd()
in tfx_addons/mlmd_client/client.py
4 2 1
def artifact_types()
in tfx_addons/mlmd_client/client.py
2 2 1