microsoft / r-server-hospital-length-of-stay
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 36 units with 311 lines of code in units (23.3% 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)
    • 1 simple units (7 lines of code)
    • 35 very simple units (304 lines of code)
0% | 0% | 0% | 2% | 97%
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% | 5% | 95%
js0% | 0% | 0% | 0% | 100%
R0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Python0% | 0% | 0% | 5% | 95%
Website/public/js0% | 0% | 0% | 0% | 100%
R0% | 0% | 0% | 0% | 100%
Website0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def create_formula()
in Python/length_of_stay_utils.py
7 7 3
def tune_rx_btrees()
in Python/step3_training_evaluation.py
24 5 6
fill_NA_explicit <- function()
in R/step1_data_preprocessing.R
16 5 1
fill_NA_mode_mean <- function()
in R/step1_data_preprocessing.R
16 5 1
def tune_rx_dforest()
in Python/step3_training_evaluation.py
20 4 5
function getUrlParameter()
in Website/public/js/predLOS.js
12 4 1
def fill_NA_explicit()
in Python/step1_data_preprocessing.py
7 3 2
def fill_NA_mode_mean()
in Python/step1_data_preprocessing.py
7 3 2
def detect_table()
in Python/length_of_stay_utils.py
6 2 2
def standardize()
in Python/step2_feature_engineering.py
4 2 2
standardize <- function()
in R/step2_feature_engineering.R
7 2 1
$()
in Website/public/js/predLOS.js
10 2 1
function toggleImg()
in Website/public/js/predLOS.js
13 2 0
var showResult = function()
in Website/public/js/predLOS.js
22 2 1
console.log = function()
in Website/server.js
4 2 1
def display_head()
in Python/length_of_stay_utils.py
4 1 2
def drop_view()
in Python/length_of_stay_utils.py
7 1 2
def alter_column()
in Python/length_of_stay_utils.py
7 1 4
def get_num_rows()
in Python/length_of_stay_utils.py
5 1 2
def train_test_split()
in Python/length_of_stay_utils.py
8 1 5