microsoft / forecasting
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 63 units with 537 lines of code in units (49.4% 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)
    • 7 simple units (134 lines of code)
    • 56 very simple units (403 lines of code)
0% | 0% | 0% | 24% | 75%
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% | 28% | 71%
R0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
fclib/fclib/dataset0% | 0% | 0% | 52% | 47%
fclib/fclib/feature_engineering0% | 0% | 0% | 19% | 80%
fclib/fclib/common0% | 0% | 0% | 28% | 71%
R_utils0% | 0% | 0% | 0% | 100%
fclib/fclib/models0% | 0% | 0% | 0% | 100%
fclib/fclib/azureml0% | 0% | 0% | 0% | 100%
fclib/fclib/evaluation0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def normalized_columns()
in fclib/fclib/feature_engineering/feature_utils.py
23 9 4
def download_ojdata()
in fclib/fclib/dataset/ojdata.py
22 7 1
def split_train_test()
in fclib/fclib/dataset/ojdata.py
32 7 7
def add_datetime()
in fclib/fclib/feature_engineering/feature_utils.py
18 7 3
def module_path()
in fclib/fclib/common/utils.py
15 6 2
def _check_frequency()
in fclib/fclib/dataset/ojdata.py
18 6 5
def _check_static_feat()
in fclib/fclib/dataset/ojdata.py
6 6 3
def system_type()
in fclib/fclib/common/utils.py
8 5 0
def _check_col_names()
in fclib/fclib/dataset/ojdata.py
10 5 3
def day_type()
in fclib/fclib/feature_engineering/feature_utils.py
16 5 3
make_cluster <- function()
in R_utils/cluster.R
17 4 2
def maybe_download()
in fclib/fclib/dataset/ojdata.py
16 4 3
def get_datetime_col()
in fclib/fclib/feature_engineering/feature_utils.py
10 4 2
def get_output_files()
in fclib/fclib/azureml/azureml_utils.py
8 3 3
def MAPE()
in fclib/fclib/evaluation/evaluation_utils.py
4 3 2
def sMAPE()
in fclib/fclib/evaluation/evaluation_utils.py
4 3 2
def normalized_current_year()
in fclib/fclib/feature_engineering/feature_utils.py
7 3 3
def normalized_current_date()
in fclib/fclib/feature_engineering/feature_utils.py
8 3 3
def normalized_current_datehour()
in fclib/fclib/feature_engineering/feature_utils.py
8 3 3
def lagged_features()
in fclib/fclib/feature_engineering/feature_utils.py
8 3 2