Skip to content
Snippets Groups Projects
Commit 81aa62ad authored by Maël Madon's avatar Maël Madon
Browse files

updated sched metrics for paper

parent ca4b65be
No related branches found
No related tags found
No related merge requests found
%% Cell type:code id: tags:
``` python
import pandas as pd
df_KTH = pd.read_csv("out/expe_replay_KTH/simu_results.csv").set_index(["expe", "replay"])
df_SDSC = pd.read_csv("out/expe_replay_SDSC/simu_results.csv").set_index(["expe", "replay"])
metrics = df_KTH.join(df_SDSC,lsuffix="_KTH",rsuffix="_SDSC")
```
%% Cell type:code id: tags:
``` python
schedmeet_cols = ["makespan","mean_waiting_time","max_waiting_time"]
cols = [s+"_KTH" for s in schedmeet_cols] + [s+"_SDSC" for s in schedmeet_cols]
to_latex = metrics[cols] / (3600*24)
print(to_latex.to_latex(escape=True,float_format="{:.2f}".format))
```
%% Output
\begin{tabular}{llrrrrrr}
\toprule
& & makespan\_KTH & mean\_waiting\_time\_KTH & max\_waiting\_time\_KTH & makespan\_SDSC & mean\_waiting\_time\_SDSC & max\_waiting\_time\_SDSC \\
expe & replay & & & & & & \\
\midrule
original\_log & NaN & 332.93 & 0.18 & 11.34 & 736.12 & 0.26 & 62.48 \\
EASY & rigid & 339.86 & 0.07 & 4.07 & 735.98 & 0.19 & 5.73 \\
& a0 & 373.08 & 0.06 & 5.06 & 813.50 & 0.14 & 5.90 \\
& a60 & 373.61 & 0.07 & 6.11 & 794.39 & 0.18 & 5.16 \\
FCFS & rigid & 340.04 & 4.51 & 11.79 & 798.88 & 14.82 & 63.96 \\
& a0 & 464.87 & 0.29 & 4.95 & 1204.72 & 0.58 & 6.26 \\
& a60 & 461.39 & 0.47 & 4.47 & 1070.33 & 0.88 & 5.51 \\
speed*2 & rigid & 339.86 & 0.01 & 1.34 & 735.94 & 0.01 & 1.84 \\
& a0 & 339.51 & 0.01 & 1.82 & 734.93 & 0.01 & 1.58 \\
& a60 & 339.55 & 0.01 & 1.44 & 734.44 & 0.02 & 1.13 \\
speed/2 & rigid & 478.83 & 31.84 & 141.34 & 1243.99 & 64.62 & 508.38 \\
& a0 & 642.91 & 0.46 & 10.70 & 1510.88 & 0.92 & 15.54 \\
& a60 & 637.23 & 0.62 & 10.26 & 1497.29 & 1.61 & 14.17 \\
infra*2 & rigid & 339.86 & 0.00 & 0.54 & 735.98 & 0.01 & 1.28 \\
& a0 & 339.57 & 0.00 & 0.81 & 734.43 & 0.01 & 1.04 \\
& a60 & 339.59 & 0.00 & 0.56 & 734.64 & 0.01 & 1.35 \\
infra/2 & rigid & 393.65 & 4.15 & 58.87 & 1172.56 & 37.43 & 437.28 \\
& a0 & 479.92 & 0.27 & 7.43 & 1456.93 & 0.80 & 14.82 \\
& a60 & 479.44 & 0.35 & 7.31 & 1450.75 & 1.20 & 15.93 \\
EASY & rigid & 332.91 & 0.07 & 4.07 & 731.36 & 0.19 & 5.73 \\
& a0 & 366.14 & 0.06 & 5.06 & 808.88 & 0.14 & 5.90 \\
& a60 & 366.67 & 0.07 & 6.11 & 789.77 & 0.18 & 5.16 \\
FCFS & rigid & 333.10 & 4.51 & 11.79 & 794.26 & 14.82 & 63.96 \\
& a0 & 457.89 & 0.29 & 4.95 & 1200.10 & 0.58 & 6.26 \\
& a60 & 454.41 & 0.47 & 4.47 & 1065.66 & 0.88 & 5.51 \\
speed*2 & rigid & 332.91 & 0.01 & 1.34 & 731.32 & 0.01 & 1.84 \\
& a0 & 332.57 & 0.01 & 1.82 & 730.31 & 0.01 & 1.58 \\
& a60 & 332.61 & 0.01 & 1.44 & 729.82 & 0.02 & 1.13 \\
speed/2 & rigid & 471.85 & 31.84 & 141.34 & 1239.37 & 64.62 & 508.38 \\
& a0 & 635.97 & 0.46 & 10.70 & 1506.26 & 0.92 & 15.54 \\
& a60 & 630.28 & 0.62 & 10.26 & 1492.67 & 1.61 & 14.17 \\
infra*2 & rigid & 332.91 & 0.00 & 0.54 & 731.36 & 0.01 & 1.28 \\
& a0 & 332.63 & 0.00 & 0.81 & 729.81 & 0.01 & 1.04 \\
& a60 & 332.65 & 0.00 & 0.56 & 730.02 & 0.01 & 1.35 \\
infra/2 & rigid & 386.70 & 4.15 & 58.87 & 1167.94 & 37.43 & 437.28 \\
& a0 & 472.93 & 0.27 & 7.43 & 1452.31 & 0.80 & 14.82 \\
& a60 & 472.45 & 0.35 & 7.31 & 1446.13 & 1.20 & 15.93 \\
\bottomrule
\end{tabular}
/run/user/1000/ipykernel_16506/575670094.py:5: FutureWarning: In future versions `DataFrame.to_latex` is expected to utilise the base implementation of `Styler.to_latex` for formatting and rendering. The arguments signature may therefore change. It is recommended instead to use `DataFrame.style.to_latex` which also contains additional functionality.
/tmp/ipykernel_12047/575670094.py:5: FutureWarning: In future versions `DataFrame.to_latex` is expected to utilise the base implementation of `Styler.to_latex` for formatting and rendering. The arguments signature may therefore change. It is recommended instead to use `DataFrame.style.to_latex` which also contains additional functionality.
print(to_latex.to_latex(escape=True,float_format="{:.2f}".format))
%% Cell type:code id: tags:
``` python
newmet_cols = ["lateness", "stretch","delta"]
cols = [s+"_KTH" for s in newmet_cols] + [s+"_SDSC" for s in newmet_cols]
to_latex = metrics[cols].query("replay == 'a0' | replay == 'a60'")
for col in ["lateness_KTH","lateness_SDSC"]:
to_latex[col] = to_latex[col] / (3600*24)
print(to_latex.to_latex(escape=True,float_format="{:.2f}".format))
```
%% Output
\begin{tabular}{llrrrrrr}
\toprule
& & lateness\_KTH & stretch\_KTH & delta\_KTH & lateness\_SDSC & stretch\_SDSC & delta\_SDSC \\
expe & replay & & & & & & \\
\midrule
EASY & a0 & -3.36 & 0.99 & -20.39 & 2.35 & 1.00 & 6.00 \\
& a60 & -4.47 & 0.99 & -27.12 & 1.04 & 1.00 & 2.65 \\
FCFS & a0 & 32.66 & 1.10 & 198.18 & 76.90 & 1.11 & 196.38 \\
& a60 & 26.31 & 1.08 & 159.64 & 36.00 & 1.05 & 91.92 \\
speed*2 & a0 & -12.40 & 0.96 & -75.27 & -11.04 & 0.98 & -28.18 \\
& a60 & -13.31 & 0.96 & -80.79 & -11.55 & 0.98 & -29.49 \\
speed/2 & a0 & 46.10 & 1.14 & 279.75 & 106.58 & 1.15 & 272.17 \\
& a60 & 43.54 & 1.13 & 264.24 & 95.34 & 1.13 & 243.47 \\
infra*2 & a0 & -8.65 & 0.97 & -52.48 & -8.58 & 0.99 & -21.92 \\
& a60 & -9.32 & 0.97 & -56.57 & -9.23 & 0.99 & -23.56 \\
infra/2 & a0 & 16.48 & 1.05 & 99.99 & 89.82 & 1.12 & 229.37 \\
& a60 & 14.91 & 1.04 & 90.48 & 81.50 & 1.11 & 208.12 \\
\bottomrule
\end{tabular}
/run/user/1000/ipykernel_16506/2064315532.py:8: FutureWarning: In future versions `DataFrame.to_latex` is expected to utilise the base implementation of `Styler.to_latex` for formatting and rendering. The arguments signature may therefore change. It is recommended instead to use `DataFrame.style.to_latex` which also contains additional functionality.
print(to_latex.to_latex(escape=True,float_format="{:.2f}".format))
%% Cell type:code id: tags:
``` python
df_KTH = pd.read_csv("out/expe_replay_KTH/delta_user_quantiles.csv").set_index("Unnamed: 0")
df_SDSC = pd.read_csv("out/expe_replay_SDSC/delta_user_quantiles.csv").set_index("Unnamed: 0")
to_latex = df_KTH.join(df_SDSC,lsuffix="_KTH",rsuffix="_SDSC")
print(to_latex.to_latex(escape=True,float_format="{:.0f}".format))
```
%% Output
\begin{tabular}{lrrrrrr}
\toprule
{} & 10\_KTH & 50\_KTH & 90\_KTH & 10\_SDSC & 50\_SDSC & 90\_SDSC \\
Unnamed: 0 & & & & & & \\
\midrule
FCFS & -5 & 8775 & 44525 & 0 & 12141 & 67078 \\
EASY & -17980 & -699 & 918 & -8898 & 0 & 4180 \\
speed*2 & -26247 & -2186 & -49 & -26170 & -1803 & 0 \\
infra*2 & -25321 & -1553 & -18 & -21738 & -1288 & 0 \\
speed/2 & 0 & 10485 & 47168 & 0 & 15190 & 153976 \\
infra/2 & -8695 & 2586 & 19434 & 0 & 13424 & 119480 \\
\bottomrule
\end{tabular}
/run/user/1000/ipykernel_25758/718579649.py:4: FutureWarning: In future versions `DataFrame.to_latex` is expected to utilise the base implementation of `Styler.to_latex` for formatting and rendering. The arguments signature may therefore change. It is recommended instead to use `DataFrame.style.to_latex` which also contains additional functionality.
print(to_latex.to_latex(escape=True,float_format="{:.0f}".format))
%% Cell type:code id: tags:
``` python
```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment