Skip to content

Commit

Permalink
Artifact reorganization and new results captured on the Chameleon tes…
Browse files Browse the repository at this point in the history
…tbed
  • Loading branch information
llpilla committed Mar 2, 2023
1 parent 5238eea commit 2289c44
Show file tree
Hide file tree
Showing 32 changed files with 6,177 additions and 67 deletions.
130 changes: 112 additions & 18 deletions README.md

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions chameleon_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
numpy>=1.19.5
matplotlib>=3.3.4
pandas>=1.1.5
seaborn>=0.11.2
scipy>=1.5.4
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
"source": [
"# reads the result file\n",
"results = pd.read_csv('results_of_timing_with_fixed_resources.csv', comment='#')\n",
"print('- Results with increasing numbers of tasks')\n",
"print('Execution time analysis')\n",
"print('- Results with increasing numbers of tasks (fixed resources)')\n",
"results.head(9)"
]
},
Expand Down Expand Up @@ -93,7 +94,7 @@
"metadata": {},
"outputs": [],
"source": [
"print('-- Generating figures')\n",
"print('-- Generating figure fig-time-fixed-resources.pdf for the results with a fixed number of resources')\n",
"\n",
"# Sets figure parameters\n",
"plt.figure(figsize=(6,5))\n",
Expand Down Expand Up @@ -140,14 +141,14 @@
"metadata": {},
"outputs": [],
"source": [
"print('- Result description')\n",
"print('- Result description: data distribution for 200 and 2000 tasks with different schedulers')\n",
"for sched in schedulers:\n",
" for tasks in (200, 2000):\n",
" res = results[(results['Scheduler'] == sched) &\n",
" (results['Tasks'] == tasks)].avg\n",
" print(f'Scheduler {sched} with {tasks} tasks')\n",
" print(res.describe())\n",
" print('\\n')"
" print(' ')"
]
},
{
Expand All @@ -164,6 +165,7 @@
"outputs": [],
"source": [
"print('-- Checking the distribution of origin for different results')\n",
"print(' Kolmogorov-Smirnov test results with p-values < 0.05 mean that the results do not follow normal distributions')\n",
"# Checking all schedulers\n",
"np.random.seed(2022)\n",
"for sched in schedulers:\n",
Expand All @@ -183,6 +185,8 @@
"source": [
"# Statistical comparison between MarCo and MarDecUn\n",
"# Using Mann-Whitney U test as results do not follow normal distributions some times (p-values < 0.05)\n",
"print(' ')\n",
"print('-- Comparing MarCo and MarDecUn. p-values < 0.05 indicate that the algorithms perform differently')\n",
"for tasks in range(200,2001,200):\n",
" marco = list(results[(results['Scheduler'] == 'MarCo') &\n",
" (results['Tasks'] == tasks)].avg)\n",
Expand Down Expand Up @@ -214,7 +218,7 @@
"source": [
"# reads the result file\n",
"results = pd.read_csv('results_of_timing_with_fixed_tasks.csv', comment='#')\n",
"print('- Results with increasing numbers of resources')\n",
"print('\\n- Results with increasing numbers of resources (fixed tasks)')\n",
"results.head(9)"
]
},
Expand Down Expand Up @@ -248,7 +252,7 @@
"metadata": {},
"outputs": [],
"source": [
"print('-- Generating figures')\n",
"print('-- Generating figure fig-time-fixed-tasks.pdf for the results with a fixed number of tasks')\n",
"\n",
"# Sets figure parameters\n",
"plt.figure(figsize=(6,5))\n",
Expand Down Expand Up @@ -295,14 +299,14 @@
"metadata": {},
"outputs": [],
"source": [
"print('- Result description')\n",
"print('- Result description: data distribution for 20 and 80 resources with different schedulers')\n",
"for sched in schedulers:\n",
" for resources in (20, 80):\n",
" res = results[(results['Scheduler'] == sched) &\n",
" (results['Resources'] == resources)].avg\n",
" print(f'Scheduler {sched} with {resources} resources')\n",
" print(res.describe())\n",
" print('\\n')"
" print(' ')"
]
},
{
Expand All @@ -319,6 +323,7 @@
"outputs": [],
"source": [
"print('-- Checking the distribution of origin for different results')\n",
"print(' Kolmogorov-Smirnov test results with p-values < 0.05 mean that the results do not follow normal distributions')\n",
"# Checking all schedulers\n",
"np.random.seed(2022)\n",
"for sched in schedulers:\n",
Expand All @@ -338,13 +343,16 @@
"source": [
"# Statistical comparison between MarCo and MarDecUn\n",
"# Using Mann-Whitney U test as results do not follow normal distributions some times (p-values < 0.05)\n",
"print(' ')\n",
"print('-- Comparing MarCo and MarDecUn. p-values < 0.05 indicate that the algorithms perform differently')\n",
"for resources in range(20,81,20):\n",
" marco = list(results[(results['Scheduler'] == 'MarCo') &\n",
" (results['Resources'] == resources)].avg)\n",
" mardec = list(results[(results['Scheduler'] == 'MarDec') &\n",
" (results['Resources'] == resources)].avg)\n",
" print(f'Mann-Whitney U test - ({resources} resources).')\n",
" print(stats.mannwhitneyu(marco, mardec, alternative='two-sided'))"
" print(stats.mannwhitneyu(marco, mardec, alternative='two-sided'))\n",
"print('\\n') "
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@

# reads the result file
results = pd.read_csv('results_of_timing_with_fixed_resources.csv', comment='#')
print('- Results with increasing numbers of tasks')
print('Execution time analysis')
print('- Results with increasing numbers of tasks (fixed resources)')
results.head(9)


Expand All @@ -66,7 +67,7 @@
# In[ ]:


print('-- Generating figures')
print('-- Generating figure fig-time-fixed-resources.pdf for the results with a fixed number of resources')

# Sets figure parameters
plt.figure(figsize=(6,5))
Expand Down Expand Up @@ -105,14 +106,14 @@
# In[ ]:


print('- Result description')
print('- Result description: data distribution for 200 and 2000 tasks with different schedulers')
for sched in schedulers:
for tasks in (200, 2000):
res = results[(results['Scheduler'] == sched) &
(results['Tasks'] == tasks)].avg
print(f'Scheduler {sched} with {tasks} tasks')
print(res.describe())
print('\n')
print(' ')


# ### Distributions of the results
Expand All @@ -121,6 +122,7 @@


print('-- Checking the distribution of origin for different results')
print(' Kolmogorov-Smirnov test results with p-values < 0.05 mean that the results do not follow normal distributions')
# Checking all schedulers
np.random.seed(2022)
for sched in schedulers:
Expand All @@ -137,6 +139,8 @@

# Statistical comparison between MarCo and MarDecUn
# Using Mann-Whitney U test as results do not follow normal distributions some times (p-values < 0.05)
print(' ')
print('-- Comparing MarCo and MarDecUn. p-values < 0.05 indicate that the algorithms perform differently')
for tasks in range(200,2001,200):
marco = list(results[(results['Scheduler'] == 'MarCo') &
(results['Tasks'] == tasks)].avg)
Expand All @@ -155,7 +159,7 @@

# reads the result file
results = pd.read_csv('results_of_timing_with_fixed_tasks.csv', comment='#')
print('- Results with increasing numbers of resources')
print('\n- Results with increasing numbers of resources (fixed tasks)')
results.head(9)


Expand All @@ -180,7 +184,7 @@
# In[ ]:


print('-- Generating figures')
print('-- Generating figure fig-time-fixed-tasks.pdf for the results with a fixed number of tasks')

# Sets figure parameters
plt.figure(figsize=(6,5))
Expand Down Expand Up @@ -219,14 +223,14 @@
# In[ ]:


print('- Result description')
print('- Result description: data distribution for 20 and 80 resources with different schedulers')
for sched in schedulers:
for resources in (20, 80):
res = results[(results['Scheduler'] == sched) &
(results['Resources'] == resources)].avg
print(f'Scheduler {sched} with {resources} resources')
print(res.describe())
print('\n')
print(' ')


# ### Distributions of the results
Expand All @@ -235,6 +239,7 @@


print('-- Checking the distribution of origin for different results')
print(' Kolmogorov-Smirnov test results with p-values < 0.05 mean that the results do not follow normal distributions')
# Checking all schedulers
np.random.seed(2022)
for sched in schedulers:
Expand All @@ -251,13 +256,16 @@

# Statistical comparison between MarCo and MarDecUn
# Using Mann-Whitney U test as results do not follow normal distributions some times (p-values < 0.05)
print(' ')
print('-- Comparing MarCo and MarDecUn. p-values < 0.05 indicate that the algorithms perform differently')
for resources in range(20,81,20):
marco = list(results[(results['Scheduler'] == 'MarCo') &
(results['Resources'] == resources)].avg)
mardec = list(results[(results['Scheduler'] == 'MarDec') &
(results['Resources'] == resources)].avg)
print(f'Mann-Whitney U test - ({resources} resources).')
print(stats.mannwhitneyu(marco, mardec, alternative='two-sided'))
print('\n')


# MarCo and MarDec perform differently (p-values < 0.05).
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"source": [
"# reads the result file\n",
"results = pd.read_csv('results_with_random_costs.csv', comment='#')\n",
"print('Total cost analysis')\n",
"print('- Results with random costs')\n",
"results.head(9)"
]
Expand All @@ -78,7 +79,7 @@
"metadata": {},
"outputs": [],
"source": [
"print('-- Generating figures')\n",
"print('-- Generating figures fig-random-10.pdf and fig-random-100.pdf')\n",
"\n",
"# Sets figure parameters\n",
"plt.figure(figsize=(6,5))\n",
Expand Down Expand Up @@ -145,6 +146,7 @@
"outputs": [],
"source": [
"# Checking how many times other schedulers meet the performance of (MC)^2MKP\n",
"print('-- Checking how many times other schedulers meet the performance of (MC)2MKP')\n",
"mc2mkp_cost = results[results['Scheduler'] == '(MC)2MKP']['Total Cost'].reset_index(drop=True)\n",
"for scheduler in schedulers[1:]:\n",
" other_cost = results[results['Scheduler'] == scheduler]['Total Cost'].reset_index(drop=True)\n",
Expand All @@ -171,7 +173,7 @@
"source": [
"# reads the result file\n",
"results = pd.read_csv('results_with_increasing_marginal_costs.csv', comment='#')\n",
"print('- Results with increasing marginal costs')\n",
"print('\\n- Results with increasing marginal costs')\n",
"results.head(9)"
]
},
Expand All @@ -190,7 +192,7 @@
"metadata": {},
"outputs": [],
"source": [
"print('-- Generating figures')\n",
"print('-- Generating figures fig-increasing-10.pdf and fig-increasing-100.pdf')\n",
"\n",
"# Sets figure parameters\n",
"plt.figure(figsize=(6,5))\n",
Expand Down Expand Up @@ -259,6 +261,7 @@
"outputs": [],
"source": [
"# Checking how many times other schedulers meet the performance of (MC)^2MKP\n",
"print('-- Checking how many times other schedulers meet the performance of (MC)2MKP')\n",
"mc2mkp_cost = results[results['Scheduler'] == '(MC)2MKP']['Total Cost'].reset_index(drop=True)\n",
"for scheduler in schedulers[1:]:\n",
" other_cost = results[results['Scheduler'] == scheduler]['Total Cost'].reset_index(drop=True)\n",
Expand All @@ -285,7 +288,7 @@
"source": [
"# reads the result file\n",
"results = pd.read_csv('results_with_constant_marginal_costs.csv', comment='#')\n",
"print('- Results with constant marginal costs')\n",
"print('\\n- Results with constant marginal costs')\n",
"results.head(9)"
]
},
Expand All @@ -304,7 +307,7 @@
"metadata": {},
"outputs": [],
"source": [
"print('-- Generating figures')\n",
"print('-- Generating figures fig-constant-10.pdf and fig-constant-100.pdf')\n",
"\n",
"# Sets figure parameters\n",
"plt.figure(figsize=(6,5))\n",
Expand Down Expand Up @@ -373,6 +376,7 @@
"outputs": [],
"source": [
"# Checking how many times other schedulers meet the performance of (MC)^2MKP\n",
"print('-- Checking how many times other schedulers meet the performance of (MC)2MKP')\n",
"mc2mkp_cost = results[results['Scheduler'] == '(MC)2MKP']['Total Cost'].reset_index(drop=True)\n",
"for scheduler in schedulers[1:]:\n",
" other_cost = results[results['Scheduler'] == scheduler]['Total Cost'].reset_index(drop=True)\n",
Expand All @@ -399,7 +403,7 @@
"source": [
"# reads the result file\n",
"results = pd.read_csv('results_with_decreasing_marginal_costs.csv', comment='#')\n",
"print('- Results with decreasing marginal costs')\n",
"print('\\n- Results with decreasing marginal costs')\n",
"results.head(9)"
]
},
Expand All @@ -418,7 +422,7 @@
"metadata": {},
"outputs": [],
"source": [
"print('-- Generating figures')\n",
"print('-- Generating figures fig-decreasing-10.pdf, fig-decreasing-100.pdf, and fig-decreasing-100-zoom.pdf')\n",
"\n",
"# Sets figure parameters\n",
"plt.figure(figsize=(6,5))\n",
Expand Down Expand Up @@ -520,6 +524,7 @@
"outputs": [],
"source": [
"# Checking how many times other schedulers meet the performance of (MC)^2MKP\n",
"print('-- Checking how many times other schedulers meet the performance of (MC)2MKP')\n",
"mc2mkp_cost = results[results['Scheduler'] == '(MC)2MKP']['Total Cost'].reset_index(drop=True)\n",
"for scheduler in schedulers[1:]:\n",
" other_cost = results[results['Scheduler'] == scheduler]['Total Cost'].reset_index(drop=True)\n",
Expand All @@ -546,7 +551,7 @@
"source": [
"# reads the result file\n",
"results = pd.read_csv('results_with_constant_marginal_costs_no_upper_limit.csv', comment='#')\n",
"print('- Results with constant marginal costs and no upper limits')\n",
"print('\\n- Results with constant marginal costs and no upper limits')\n",
"results.head(9)"
]
},
Expand All @@ -565,7 +570,7 @@
"metadata": {},
"outputs": [],
"source": [
"print('-- Generating figures')\n",
"print('-- Generating figures fig-constant-10-no-u.pdf and fig-constant-100-no-u.pdf')\n",
"\n",
"# Sets figure parameters\n",
"plt.figure(figsize=(6,5))\n",
Expand Down Expand Up @@ -634,6 +639,7 @@
"outputs": [],
"source": [
"# Checking how many times other schedulers meet the performance of (MC)^2MKP\n",
"print('-- Checking how many times other schedulers meet the performance of (MC)2MKP')\n",
"mc2mkp_cost = results[results['Scheduler'] == '(MC)2MKP']['Total Cost'].reset_index(drop=True)\n",
"for scheduler in ['MarIn', 'MarCo', 'MarDecUn', 'FedAvg']:\n",
" other_cost = results[results['Scheduler'] == scheduler]['Total Cost'].reset_index(drop=True)\n",
Expand Down
Loading

0 comments on commit 2289c44

Please sign in to comment.