LTC details raw values


In [4]:
%matplotlib inline

import pandas as pd
import pylab
import matplotlib.pyplot as plt
import openpyxl

In [5]:
df = pd.read_csv("../../data/processed/result_detail_ltc.csv",delimiter=";")
df.head()


Out[5]:
id_node lvl ltc
0 128656 0 4
1 128656 1 7676
2 128656 2 9455
3 128656 3 9707
4 128656 4 9747

In [7]:
df[['lvl','id_node']].groupby(['lvl']).size()


Out[7]:
lvl
0     256491
1     214362
2     151173
3      77913
4      26795
5      15279
6        418
7        207
8         36
9         14
10         6
11         2
12         2
dtype: int64

In [5]:
df[['lvl','id_node']].groupby(['lvl']).size().plot(logy=True)

pylab.title("Nodes vs levels (cumulative)")
pylab.xlabel("Levels")
_ = pylab.ylabel("Nodes (cumulative)")



In [8]:
def print_full(x):
    pd.set_option('display.max_rows', len(x))
    print(x)
    pd.reset_option('display.max_rows')

In [9]:
print_full(df[['lvl','ltc']].groupby(['lvl']).describe())


                     ltc
lvl                     
0   count  256491.000000
    mean        2.558624
    std        38.964447
    min         1.000000
    25%         1.000000
    50%         1.000000
    75%         2.000000
    max     14063.000000
1   count  214362.000000
    mean      982.771471
    std      2111.219928
    min         2.000000
    25%        24.000000
    50%       150.000000
    75%       640.000000
    max     45273.000000
2   count  151173.000000
    mean     1554.269122
    std      2783.817218
    min         3.000000
    25%       125.000000
    50%       407.000000
    75%      1202.000000
    max     51671.000000
3   count   77913.000000
    mean     2837.904701
    std      3550.835850
    min         4.000000
    25%       464.000000
    50%      1143.000000
    75%      4002.000000
    max     52782.000000
4   count   26795.000000
    mean     5699.402799
    std      4623.469236
    min         9.000000
    25%       831.000000
    50%      8796.000000
    75%      8808.000000
    max     52977.000000
5   count   15279.000000
    mean     9138.098567
    std      2961.887363
    min        32.000000
    25%      8802.000000
    50%      8802.000000
    75%      9498.000000
    max     53001.000000
6   count     418.000000
    mean    12693.456938
    std      6204.946041
    min       388.000000
    25%      9715.000000
    50%     11852.500000
    75%     15891.000000
    max     53011.000000
7   count     207.000000
    mean    14221.449275
    std      6168.810416
    min      2389.000000
    25%      9824.000000
    50%     13280.000000
    75%     17452.500000
    max     53014.000000
8   count      36.000000
    mean    17146.694444
    std      7434.687150
    min      3031.000000
    25%     13947.000000
    50%     18510.500000
    75%     22689.250000
    max     30056.000000
9   count      14.000000
    mean    19548.928571
    std      7994.360690
    min      3863.000000
    25%     19355.750000
    50%     22352.500000
    75%     23945.500000
    max     30111.000000
10  count       6.000000
    mean    20822.333333
    std      7679.003260
    min      7135.000000
    25%     19565.250000
    50%     22389.000000
    75%     23765.250000
    max     30173.000000
11  count       2.000000
    mean    26529.000000
    std      5190.163774
    min     22859.000000
    25%     24694.000000
    50%     26529.000000
    75%     28364.000000
    max     30199.000000
12  count       2.000000
    mean    26532.500000
    std      5193.699308
    min     22860.000000
    25%     24696.250000
    50%     26532.500000
    75%     28368.750000
    max     30205.000000

In [10]:
df[['lvl','ltc']].corr()


Out[10]:
lvl ltc
lvl 1.000000 0.558861
ltc 0.558861 1.000000

In [11]:
df[['lvl','ltc']].corr(method="spearman")


Out[11]:
lvl ltc
lvl 1.000000 0.836497
ltc 0.836497 1.000000

In [12]:
df[['lvl','ltc']].corr(method="kendall")


Out[12]:
lvl ltc
lvl 1.000000 0.698245
ltc 0.698245 1.000000

In [ ]: