tensorflow / data-validation
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 814 units with 9,621 lines of code in units (66.6% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (451 lines of code)
    • 37 medium complex units (1,774 lines of code)
    • 79 simple units (2,215 lines of code)
    • 695 very simple units (5,181 lines of code)
0% | 4% | 18% | 23% | 53%
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
cc0% | 9% | 23% | 21% | 45%
py0% | 1% | 15% | 24% | 59%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tensorflow_data_validation/anomalies0% | 9% | 23% | 21% | 45%
tensorflow_data_validation/utils0% | 5% | 20% | 17% | 56%
tensorflow_data_validation/statistics0% | 0% | 14% | 26% | 58%
tensorflow_data_validation/arrow0% | 0% | 18% | 41% | 39%
tensorflow_data_validation/skew0% | 0% | 0% | 57% | 42%
tensorflow_data_validation/tools0% | 0% | 0% | 69% | 30%
ROOT0% | 0% | 0% | 19% | 80%
tensorflow_data_validation/api0% | 0% | 0% | 0% | 100%
tensorflow_data_validation0% | 0% | 0% | 0% | 100%
tensorflow_data_validation/pywrap0% | 0% | 0% | 0% | 100%
tensorflow_data_validation/coders0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void Schema::UpdateFeatureInternal()
in tensorflow_data_validation/anomalies/schema.cc
191 43 5
std::vector Schema::UpdateFeatureSelf()
in tensorflow_data_validation/anomalies/schema.cc
176 39 1
def get_schema_dataframe()
in tensorflow_data_validation/utils/display_util.py
84 32 1
def _mi_for_arrays()
in tensorflow_data_validation/utils/mutual_information_util.py
60 25 8
def generate_equi_width_buckets()
in tensorflow_data_validation/utils/quantiles_util.py
41 25 5
def get_generators()
in tensorflow_data_validation/statistics/stats_impl.py
61 22 2
std::vector UpdateBoolDomain()
in tensorflow_data_validation/anomalies/bool_domain_util.cc
124 21 2
def _calculate_mi()
in tensorflow_data_validation/statistics/generators/sklearn_mutual_information.py
60 18 5
def add_input()
in tensorflow_data_validation/statistics/generators/basic_stats_generator.py
35 16 3
std::vector UpdateNaturalLanguageDomain()
in tensorflow_data_validation/anomalies/natural_language_domain_util.cc
66 16 2
def __init__()
in tensorflow_data_validation/statistics/generators/basic_stats_generator.py
18 15 4
def merge_accumulators()
in tensorflow_data_validation/statistics/generators/basic_stats_generator.py
33 15 2
def set_domain()
in tensorflow_data_validation/utils/schema_util.py
35 15 3
IntIntervalResult GetIntInterval()
in tensorflow_data_validation/anomalies/int_domain_util.cc
49 15 1
tensorflow::Status ValidateFeatureStatisticsWithSerializedInputs()
in tensorflow_data_validation/anomalies/feature_statistics_validator.cc
83 15 10
def _calculate_mi()
in tensorflow_data_validation/statistics/generators/mutual_information.py
48 14 6
def _make_feature_stats_proto()
in tensorflow_data_validation/statistics/generators/basic_stats_generator.py
56 13 14
std::set AllowedFeatureTypes()
in tensorflow_data_validation/anomalies/schema.cc
34 13 1
std::vector Schema::UpdateWeightedFeature()
in tensorflow_data_validation/anomalies/schema.cc
43 13 2
std::vector UpdateNumExamplesComparatorDirect()
in tensorflow_data_validation/anomalies/dataset_constraints_util.cc
73 13 3