microsoft / forecasting
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 63 units with 537 lines of code in units (49.4% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (77 lines of code)
    • 12 small units (192 lines of code)
    • 48 very small units (268 lines of code)
0% | 0% | 14% | 35% | 49%
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% | 16% | 30% | 53%
R0% | 0% | 0% | 77% | 22%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
fclib/fclib/dataset0% | 0% | 36% | 33% | 29%
fclib/fclib/feature_engineering0% | 0% | 10% | 28% | 60%
R_utils0% | 0% | 0% | 77% | 22%
fclib/fclib/common0% | 0% | 0% | 60% | 39%
fclib/fclib/models0% | 0% | 0% | 0% | 100%
fclib/fclib/azureml0% | 0% | 0% | 0% | 100%
fclib/fclib/evaluation0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def split_train_test()
in fclib/fclib/dataset/ojdata.py
32 7 7
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 _check_frequency()
in fclib/fclib/dataset/ojdata.py
18 6 5
def add_datetime()
in fclib/fclib/feature_engineering/feature_utils.py
18 7 3
make_cluster <- function()
in R_utils/cluster.R
17 4 2
get_forecasts <- function()
in R_utils/model_eval.R
17 1 3
def plot_predictions_with_history()
in fclib/fclib/common/plot.py
17 1 0
def maybe_download()
in fclib/fclib/dataset/ojdata.py
16 4 3
def _gen_split_indices()
in fclib/fclib/dataset/ojdata.py
16 1 5
def day_type()
in fclib/fclib/feature_engineering/feature_utils.py
16 5 3
eval_forecasts <- function()
in R_utils/model_eval.R
15 2 2
def module_path()
in fclib/fclib/common/utils.py
15 6 2
def gen_sequence_array()
in fclib/fclib/feature_engineering/feature_utils.py
15 2 7
def week_of_month()
in fclib/fclib/feature_engineering/feature_utils.py
12 2 1
def specify_data_schema()
in fclib/fclib/dataset/ojdata.py
10 1 0
def _check_col_names()
in fclib/fclib/dataset/ojdata.py
10 5 3
def get_datetime_col()
in fclib/fclib/feature_engineering/feature_utils.py
10 4 2
def fit()
in fclib/fclib/models/multiple_linear_regression.py
10 3 4
def create_dcnn_model()
in fclib/fclib/models/dilated_cnn.py
9 1 0