In [15]:
%matplotlib inline
import pandas as pd
import random
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
In [2]:
df = pd.read_csv('all_results.csv')
In [3]:
df.head()
Out[3]:
machine
limits
benchmark
lower_is_better
repetition
result
0
issdm-0
with_limits
stressng-cpu-ackermann
False
1
3.714227
1
issdm-0
with_limits
stressng-cpu-bitops
False
1
645.827821
2
issdm-0
with_limits
stressng-cpu-callfunc
False
1
91572.017155
3
issdm-0
with_limits
stressng-cpu-cdouble
False
1
1147.835587
4
issdm-0
with_limits
stressng-cpu-cfloat
False
1
799.724912
In [4]:
df['machine'].unique()
Out[4]:
array(['issdm-0', 'issdm-1', 'issdm-11', 'issdm-14', 'issdm-16',
'issdm-17', 'issdm-24', 'issdm-27', 'issdm-29', 'issdm-3',
'issdm-34', 'issdm-40', 'issdm-6'], dtype=object)
In [5]:
df['benchmark'].unique()
Out[5]:
array(['stressng-cpu-ackermann', 'stressng-cpu-bitops',
'stressng-cpu-callfunc', 'stressng-cpu-cdouble',
'stressng-cpu-cfloat', 'stressng-cpu-clongdouble',
'stressng-cpu-correlate', 'stressng-cpu-crc16',
'stressng-cpu-decimal32', 'stressng-cpu-decimal64',
'stressng-cpu-decimal128', 'stressng-cpu-dither',
'stressng-cpu-djb2a', 'stressng-cpu-double', 'stressng-cpu-euler',
'stressng-cpu-explog', 'stressng-cpu-fft', 'stressng-cpu-fibonacci',
'stressng-cpu-float', 'stressng-cpu-fnv1a', 'stressng-cpu-gamma',
'stressng-cpu-gcd', 'stressng-cpu-gray', 'stressng-cpu-hamming',
'stressng-cpu-hanoi', 'stressng-cpu-hyperbolic',
'stressng-cpu-idct', 'stressng-cpu-int128', 'stressng-cpu-int64',
'stressng-cpu-int32', 'stressng-cpu-int16', 'stressng-cpu-int8',
'stressng-cpu-int128float', 'stressng-cpu-int128double',
'stressng-cpu-int128longdouble', 'stressng-cpu-int128decimal32',
'stressng-cpu-int128decimal64', 'stressng-cpu-int128decimal128',
'stressng-cpu-int64float', 'stressng-cpu-int64double',
'stressng-cpu-int64longdouble', 'stressng-cpu-int32float',
'stressng-cpu-int32double', 'stressng-cpu-int32longdouble',
'stressng-cpu-jenkin', 'stressng-cpu-jmp', 'stressng-cpu-ln2',
'stressng-cpu-longdouble', 'stressng-cpu-loop',
'stressng-cpu-matrixprod', 'stressng-cpu-nsqrt',
'stressng-cpu-omega', 'stressng-cpu-parity', 'stressng-cpu-phi',
'stressng-cpu-pi', 'stressng-cpu-pjw', 'stressng-cpu-prime',
'stressng-cpu-psi', 'stressng-cpu-queens', 'stressng-cpu-rand',
'stressng-cpu-rand48', 'stressng-cpu-rgb', 'stressng-cpu-sdbm',
'stressng-cpu-sieve', 'stressng-cpu-sqrt', 'stressng-cpu-trig',
'stressng-cpu-union', 'stressng-cpu-zeta', 'stressng-cpu-af-alg',
'stressng-cpu-bsearch', 'stressng-cpu-cpu', 'stressng-cpu-crypt',
'stressng-cpu-hsearch', 'stressng-cpu-longjmp',
'stressng-cpu-lsearch', 'stressng-cpu-numa', 'stressng-cpu-qsort',
'stressng-cpu-str', 'stressng-cpu-stream', 'stressng-cpu-tsearch',
'stressng-cpu-vecmath', 'stressng-cpu-wcs',
'stressng-cpu-cache-cache', 'stressng-cpu-cache-icache',
'stressng-memory-context', 'stressng-memory-full',
'stressng-memory-lockbus', 'stressng-memory-malloc',
'stressng-memory-matrix', 'stressng-memory-memcpy',
'stressng-memory-memfd', 'stressng-memory-mincore',
'stressng-memory-null', 'stressng-memory-oom-pipe',
'stressng-memory-pipe', 'stressng-memory-remap',
'stressng-memory-str', 'stressng-memory-vm',
'stressng-memory-vm-rw', 'stressng-memory-zero',
'stressng-matrix-add', 'stressng-matrix-div',
'stressng-matrix-frobenius', 'stressng-matrix-mult',
'stressng-matrix-prod', 'stressng-matrix-sub',
'stressng-matrix-hadamard', 'stressng-matrix-trans',
'stressng-string-index', 'stressng-string-rindex',
'stressng-string-strcasecmp', 'stressng-string-strcat',
'stressng-string-strchr', 'stressng-string-strcoll',
'stressng-string-strcmp', 'stressng-string-strcpy',
'stressng-string-strlen', 'stressng-string-strncasecmp',
'stressng-string-strncat', 'stressng-string-strncmp',
'stressng-string-strrchr', 'stressng-string-strxfrm',
'stressng-memory-stack'], dtype=object)
In [ ]:
In [37]:
sns.set()
sns.set_context("poster")
plt.figsize=(24, 6)
plt.xticks(rotation=90)
sns.barplot(x='benchmark', y='result_normalized', hue='limits', data=df, estimator=np.var, ci=None)
Out[37]:
<matplotlib.axes._subplots.AxesSubplot at 0x7ff870c10be0>
In [23]:
df['result_normalized'] = df.apply(
lambda x:
(x['result'] - df[df['limits'] == x['limits']]['result'].mean()) /
(df[df['limits'] == x['limits']]['result'].max() -
df[df['limits'] == x['limits']]['result'].min()),
axis=1
)
In [38]:
df.groupby(['benchmark', 'limits'])['result_normalized'].var()
Out[38]:
benchmark limits
stressng-cpu-ackermann no_limits 1.023216e-21
with_limits 2.601885e-19
stressng-cpu-af-alg no_limits 4.273374e-07
with_limits 2.174560e-08
stressng-cpu-bitops no_limits 9.891506e-18
with_limits 9.953678e-17
stressng-cpu-bsearch no_limits 2.266856e-14
with_limits 2.540493e-14
stressng-cpu-cache-cache no_limits 3.763316e-15
with_limits 2.308480e-15
stressng-cpu-cache-icache no_limits 1.669318e-11
with_limits 2.396653e-11
stressng-cpu-callfunc no_limits 3.127844e-08
with_limits 4.642223e-08
stressng-cpu-cdouble no_limits 1.308941e-11
with_limits 1.106698e-11
stressng-cpu-cfloat no_limits 1.360872e-12
with_limits 1.257949e-12
stressng-cpu-clongdouble no_limits 1.592075e-12
with_limits 1.996175e-12
stressng-cpu-correlate no_limits 3.220914e-18
with_limits 1.705600e-17
stressng-cpu-cpu no_limits 1.908123e-15
with_limits 7.077224e-16
stressng-cpu-crc16 no_limits 6.107480e-19
with_limits 1.459053e-17
stressng-cpu-crypt no_limits 2.131432e-16
with_limits 3.153715e-16
stressng-cpu-decimal128 no_limits 6.278285e-14
with_limits 4.464930e-14
...
stressng-memory-zero no_limits 9.714451e-05
with_limits 5.852383e-05
stressng-string-index no_limits 1.823337e-09
with_limits 1.197749e-08
stressng-string-rindex no_limits 1.642235e-08
with_limits 1.639445e-08
stressng-string-strcasecmp no_limits 8.743711e-12
with_limits 8.265698e-12
stressng-string-strcat no_limits 1.569654e-13
with_limits 3.796667e-13
stressng-string-strchr no_limits 1.815292e-08
with_limits 1.205028e-08
stressng-string-strcmp no_limits 3.006733e-11
with_limits 4.562351e-11
stressng-string-strcoll no_limits 5.605038e-11
with_limits 3.898921e-09
stressng-string-strcpy no_limits 2.016990e-09
with_limits 1.769227e-09
stressng-string-strlen no_limits 1.532796e-08
with_limits 1.795313e-08
stressng-string-strncasecmp no_limits 2.431632e-11
with_limits 6.635604e-12
stressng-string-strncat no_limits 4.528378e-14
with_limits 1.013410e-13
stressng-string-strncmp no_limits 1.011761e-10
with_limits 2.496606e-10
stressng-string-strrchr no_limits 9.132576e-09
with_limits 9.121010e-09
stressng-string-strxfrm no_limits 2.942623e-12
with_limits 4.084085e-12
Name: result_normalized, dtype: float64
In [24]:
subdf = df[df['benchmark'] == 'stressng-matrix-add']
In [26]:
g = sns.barplot(x='benchmark', y='result_normalized', hue='limits', data=subdf, estimator=np.var, ci=None)
plt.xticks(rotation=90)
Out[26]:
(array([0]), <a list of 1 Text xticklabel objects>)
In [43]:
subdf
Out[43]:
machine
limits
benchmark
lower_is_better
repetition
result
result_normalized
0
issdm-0
with_limits
stressng-matrix-add
False
1
46366.692577
-0.365592
8
issdm-1
with_limits
stressng-matrix-add
False
1
56393.107895
0.448417
16
issdm-11
with_limits
stressng-matrix-add
False
1
52127.957669
0.102144
24
issdm-14
with_limits
stressng-matrix-add
False
1
47635.878735
-0.262552
32
issdm-16
with_limits
stressng-matrix-add
False
1
47426.202080
-0.279574
40
issdm-17
with_limits
stressng-matrix-add
False
1
51892.723139
0.083047
48
issdm-24
with_limits
stressng-matrix-add
False
1
46205.820225
-0.378653
56
issdm-27
with_limits
stressng-matrix-add
False
1
56040.586461
0.419797
64
issdm-29
with_limits
stressng-matrix-add
False
1
46212.505506
-0.378110
72
issdm-3
with_limits
stressng-matrix-add
False
1
55131.373799
0.345981
80
issdm-34
with_limits
stressng-matrix-add
False
1
45739.109742
-0.416543
88
issdm-40
with_limits
stressng-matrix-add
False
1
58056.437814
0.583457
96
issdm-6
with_limits
stressng-matrix-add
False
1
52079.160560
0.098183
104
issdm-0
no_limits
stressng-matrix-add
False
1
103855.207617
0.107555
112
issdm-1
no_limits
stressng-matrix-add
False
1
104593.473228
0.140492
120
issdm-11
no_limits
stressng-matrix-add
False
1
106136.438184
0.209331
128
issdm-14
no_limits
stressng-matrix-add
False
1
93415.577549
-0.358205
136
issdm-16
no_limits
stressng-matrix-add
False
1
103012.913513
0.069976
144
issdm-17
no_limits
stressng-matrix-add
False
1
94213.070181
-0.322625
152
issdm-24
no_limits
stressng-matrix-add
False
1
113200.051466
0.524471
160
issdm-27
no_limits
stressng-matrix-add
False
1
93073.138034
-0.373483
168
issdm-29
no_limits
stressng-matrix-add
False
1
90785.870893
-0.475529
176
issdm-3
no_limits
stressng-matrix-add
False
1
96296.550241
-0.229672
184
issdm-34
no_limits
stressng-matrix-add
False
1
104293.739823
0.127120
192
issdm-40
no_limits
stressng-matrix-add
False
1
110997.691061
0.426214
200
issdm-6
no_limits
stressng-matrix-add
False
1
104904.181970
0.154354
In [44]:
sns.boxplot(subdf['result'], groupby=subdf['limits'])
/opt/conda/lib/python3.5/site-packages/seaborn/categorical.py:2125: UserWarning: The boxplot API has been changed. Attempting to adjust your arguments for the new API (which might not work). Please update your code. See the version 0.6 release notes for more info.
warnings.warn(msg, UserWarning)
Out[44]:
<matplotlib.axes._subplots.AxesSubplot at 0x7fc0bed0f320>
In [34]:
subdf['result_normalized'] = subdf.apply(
lambda x:
(x['result'] - subdf[subdf['limits'] == x['limits']]['result'].mean()) /
(subdf[subdf['limits'] == x['limits']]['result'].max() -
subdf[subdf['limits'] == x['limits']]['result'].min()),
axis=1
)
/opt/conda/lib/python3.5/site-packages/ipykernel/__main__.py:6: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
In [41]:
sns.boxplot(subdf['result_normalized'], groupby=subdf['limits'])
/opt/conda/lib/python3.5/site-packages/seaborn/categorical.py:2125: UserWarning: The boxplot API has been changed. Attempting to adjust your arguments for the new API (which might not work). Please update your code. See the version 0.6 release notes for more info.
warnings.warn(msg, UserWarning)
Out[41]:
<matplotlib.axes._subplots.AxesSubplot at 0x7fc0bec03be0>
Content source: ivotron/torpor-popper
Similar notebooks: