microsoft / r-server-hospital-length-of-stay
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 36 units with 311 lines of code in units (23.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (68 lines of code)
    • 6 small units (96 lines of code)
    • 27 very small units (147 lines of code)
0% | 0% | 21% | 30% | 47%
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% | 17% | 27% | 55%
R0% | 0% | 28% | 42% | 28%
js0% | 0% | 23% | 26% | 50%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Python0% | 0% | 17% | 27% | 55%
R0% | 0% | 28% | 42% | 28%
Website/public/js0% | 0% | 24% | 27% | 48%
Website0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def tune_rx_btrees()
in Python/step3_training_evaluation.py
24 5 6
evaluate_model <- function()
in R/step3_training_evaluation.R
22 1 3
var showResult = function()
in Website/public/js/predLOS.js
22 2 1
def tune_rx_dforest()
in Python/step3_training_evaluation.py
20 4 5
def evaluate_model()
in Python/length_of_stay_utils.py
19 1 3
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
function toggleImg()
in Website/public/js/predLOS.js
13 2 0
function getUrlParameter()
in Website/public/js/predLOS.js
12 4 1
$()
in Website/public/js/predLOS.js
10 2 1
def train_test_split()
in Python/length_of_stay_utils.py
8 1 5
function predLOS()
in Website/public/js/predLOS.js
8 1 1
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 create_formula()
in Python/length_of_stay_utils.py
7 7 3
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
standardize <- function()
in R/step2_feature_engineering.R
7 2 1
def detect_table()
in Python/length_of_stay_utils.py
6 2 2
def calculate_number_of_issues()
in Python/step2_feature_engineering.py
6 1 2