In [1]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline

In [2]:
# Import stats
FILE = 'cleaned_stats.csv'
# JSON = '../stats.json'
JSON = '../stats50.json'

In [3]:
#df = pd.read_csv(FILE)
df = pd.read_json(JSON)

In [4]:
del df['board']
df.head()


Out[4]:
dimension heuristic rand_degree steps time
0 5 1 15 NaN 1067401.680
1 5 2 15 2164.0 44692.390
2 5 1 15 NaN 1043000.295
3 5 2 15 NaN 1059986.975
4 5 1 15 NaN 1026634.820

In [5]:
df.groupby('heuristic').describe(include=[np.number])


Out[5]:
dimension rand_degree steps time
heuristic
1 count 900.000000 900.000000 737.000000 9.000000e+02
mean 4.000000 10.000000 1142.120760 1.580620e+05
std 0.816951 4.084753 2202.493057 3.411555e+05
min 3.000000 5.000000 2.000000 6.950000e-01
25% 3.000000 5.000000 6.000000 3.182500e+00
50% 4.000000 10.000000 17.000000 2.714175e+02
75% 5.000000 15.000000 921.000000 8.366430e+04
max 5.000000 15.000000 9737.000000 2.268103e+06
2 count 900.000000 900.000000 787.000000 9.000000e+02
mean 4.000000 10.000000 783.714104 1.086980e+05
std 0.816951 4.084753 1878.861366 2.784737e+05
min 3.000000 5.000000 2.000000 6.550000e-01
25% 3.000000 5.000000 5.000000 2.265000e+00
50% 4.000000 10.000000 10.000000 7.137500e+00
75% 5.000000 15.000000 329.000000 7.899185e+03
max 5.000000 15.000000 9995.000000 1.915091e+06

In [38]:
dn = df[np.isfinite(df['steps'])]
dn.groupby('heuristic').describe(include=[np.number])


Out[38]:
dimension rand_degree steps time
heuristic
1 count 737.000000 737.000000 737.000000 737.000000
mean 3.905020 8.907734 1142.120760 23112.467110
std 0.835158 3.703649 2202.493057 77859.160373
min 3.000000 5.000000 2.000000 0.695000
25% 3.000000 5.000000 6.000000 2.810000
50% 4.000000 10.000000 17.000000 13.605000
75% 5.000000 10.000000 921.000000 4119.600000
max 5.000000 15.000000 9737.000000 990358.715000
2 count 787.000000 787.000000 787.000000 787.000000
mean 3.946633 9.282084 783.714104 20018.015305
std 0.827146 3.869595 1878.861366 84576.032327
min 3.000000 5.000000 2.000000 0.655000
25% 3.000000 5.000000 5.000000 1.917500
50% 4.000000 10.000000 10.000000 4.460000
75% 5.000000 10.000000 329.000000 542.470000
max 5.000000 15.000000 9995.000000 875336.620000

In [ ]:


In [ ]:


In [7]:
sns.factorplot(x='dimension', y='steps', data=df, hue='rand_degree', col='heuristic', size=7)


Out[7]:
<seaborn.axisgrid.FacetGrid at 0x10f041438>

In [8]:
sns.factorplot(x='dimension', y='time', data=df, hue='rand_degree', col='heuristic', size=7)


Out[8]:
<seaborn.axisgrid.FacetGrid at 0x115c34d30>

In [11]:
g = sns.FacetGrid(data=df, row='dimension', col='heuristic', hue='rand_degree', sharex=True, sharey=True, aspect=2, size=7)
g =(g.map(sns.pointplot, "time", "steps").add_legend())



In [18]:
sns.stripplot( x="dimension", y="steps", data=df, jitter=True,hue="rand_degree", size=4);



In [19]:
sns.stripplot(x="rand_degree", y="time", data=df, jitter=True, hue="dimension", size=4);



In [20]:
sns.stripplot(x="dimension", y="steps", data=df, jitter=True, hue="rand_degree", size=4);



In [21]:
sns.stripplot(x="dimension", y="time", data=df, jitter=True, hue="rand_degree", size=4);



In [ ]:
sns.swarmplot(x="dimension", y="steps", data=df, hue="rand_degree");

In [ ]:
sns.swarmplot(x="dimension", y="time", data=df, hue="rand_degree");

In [ ]:
sns.swarmplot(x="rand_degree", y="steps", data=df, hue="dimension");

In [ ]:
sns.swarmplot(x="rand_degree", y="time", data=df, hue="dimension");

In [39]:
sns.boxplot(x="rand_degree", y="steps", data=df, hue="dimension");



In [ ]:
sns.boxplot(x="rand_degree", y="time", data=df, hue="dimension");

In [ ]:
sns.boxplot(x="dimension", y="steps", data=df, hue="rand_degree");

In [ ]:
sns.boxplot(x="dimension", y="time", data=df, hue="rand_degree");

In [24]:
sns.lmplot(x="steps", y="time", hue="dimension", col="heuristic", row='rand_degree', data=df)


Out[24]:
<seaborn.axisgrid.FacetGrid at 0x1231a67f0>

In [31]:
sns.lmplot(x="steps", y="time", hue="rand_degree", col="heuristic", row='dimension', data=df)


Out[31]:
<seaborn.axisgrid.FacetGrid at 0x12547cd30>

In [25]:
sns.lmplot(x="steps", y="time", row="dimension", col="heuristic", hue="rand_degree",data=df)


Out[25]:
<seaborn.axisgrid.FacetGrid at 0x123003a20>

In [ ]:
sns.lmplot(x="steps", y="time", hue="dimension", col="heuristic", row="rand_degree", data=df)

In [32]:
sns.distplot(df['time'], bins=3)


/Users/ilyakrasnov/anaconda/lib/python3.6/site-packages/statsmodels/nonparametric/kdetools.py:20: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  y = X[:m/2+1] + np.r_[0,X[m/2+1:],0]*1j
Out[32]:
<matplotlib.axes._subplots.AxesSubplot at 0x1259e33c8>

In [33]:
sns.lmplot(y="time", x="steps", col="dimension", row="rand_degree", data=df)


Out[33]:
<seaborn.axisgrid.FacetGrid at 0x1260c2128>

In [36]:
sns.lmplot(y="steps", x="dimension", row="dimension", col="heuristic",hue="rand_degree", data=df)


Out[36]:
<seaborn.axisgrid.FacetGrid at 0x12800fb70>

In [37]:
sns.lmplot(y="time", x="dimension", row="dimension", col="heuristic",hue="rand_degree", data=df)


Out[37]:
<seaborn.axisgrid.FacetGrid at 0x1287557b8>

In [35]:
sns.lmplot(y="steps", x="dimension", hue="dimension", row="rand_degree", col="heuristic", data=df,  x_jitter=.1)


Out[35]:
<seaborn.axisgrid.FacetGrid at 0x12725c940>

In [ ]: