-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
512 additions
and
203 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import matplotlib.pyplot as plt | ||
import matplotlib | ||
import numpy as np | ||
import sys | ||
import re | ||
import csv | ||
from scipy import stats | ||
from itertools import groupby | ||
import glob | ||
import collections | ||
from statistics import mean | ||
import numpy as np | ||
from pprint import pprint as p | ||
|
||
|
||
csv_files = glob.glob("*.csv") | ||
|
||
for i, file in enumerate(csv_files): | ||
print(str(i) + ": " + str(file)) | ||
|
||
indices = input("Which two indices should be compared").split() | ||
index1, index2 = indices | ||
print(indices) | ||
|
||
files = [csv_files[int(index1)], csv_files[int(index2)]] | ||
|
||
result_dict = {} | ||
|
||
for filename in files: | ||
result_dict[filename] = {} | ||
with open(filename, newline='') as csvfile: | ||
spamreader = csv.reader(csvfile) | ||
for i, row in enumerate(spamreader): | ||
if(i == 0): pass | ||
else: | ||
result_dict[filename][row[0]] = float(row[2]) | ||
|
||
p(result_dict) | ||
temp = [] | ||
for key in result_dict.keys(): | ||
x = result_dict[key] | ||
temp.append(list({k: v for k, v in sorted(x.items(), key=lambda item: item[1])}.keys())) | ||
|
||
x1, x2 = temp | ||
|
||
print(x1) | ||
print(x2) | ||
tau, p_value = stats.kendalltau(x1,x2) | ||
|
||
|
||
|
||
print(tau,p_value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,23 @@ | ||
SixtyRequests{ | ||
features: { | ||
noise_due_service_time: truncnorm(0.0,0.5,0.2,0.2) | ||
arrival_rate: uniform(54,66) | ||
} | ||
arms: { | ||
ThreeServers: truncnorm(0.0,1.0,0.715,noise_due_service_time) | ||
SixServers: truncnorm(0.0,1.0,0.614,noise_due_service_time) | ||
EightServers: truncnorm(0.0,1.0,0.508,noise_due_service_time) | ||
ElevenServers: truncnorm(0.0,1.0,0.348,noise_due_service_time) | ||
ThirteenServers: truncnorm(0.0,1.0,0.241,noise_due_service_time) | ||
ThreeServers: utilitySWIM(arrival_rate, 1.0, normal(0.064,0.009), 13, 3) | ||
SixServers: utilitySWIM(arrival_rate, 1.0, normal(0.039,0.001), 13, 6) | ||
EightServers: utilitySWIM(arrival_rate, 1.0, normal(0.039,0.001), 13, 8) | ||
ElevenServers: utilitySWIM(arrival_rate, 1.0, normal(0.039,0.001), 13, 11) | ||
ThirteenServers: utilitySWIM(arrival_rate, 1.0, normal(0.039,0.002), 13, 13) | ||
} } | ||
EightyRequests{ | ||
features: { | ||
noise_due_service_time: truncnorm(0.0,0.5,0.2,0.2) | ||
arrival_rate: uniform(72,88) | ||
} | ||
arms: { | ||
|
||
|
||
ThreeServers: truncnorm(0.0,1.0,0.190,noise_due_service_time) | ||
SixServers: truncnorm(0.0,1.0,0.949,noise_due_service_time) | ||
EightServers: truncnorm(0.0,1.0,0.870,noise_due_service_time) | ||
ElevenServers: truncnorm(0.0,1.0,0.712,noise_due_service_time) | ||
ThirteenServers: truncnorm(0.0,1.0,0.605,noise_due_service_time) | ||
ThreeServers: utilitySWIM(arrival_rate, 1.0, normal(1.681,1.436), 13, 3) | ||
SixServers: utilitySWIM(arrival_rate, 1.0, normal(0.041,0.001), 13, 6) | ||
EightServers: utilitySWIM(arrival_rate, 1.0, normal(0.039,0.0004), 13, 8) | ||
ElevenServers: utilitySWIM(arrival_rate, 1.0, normal(0.039,0.001), 13, 11) | ||
ThirteenServers: utilitySWIM(arrival_rate, 1.0, normal(0.039,0.001), 13, 13) | ||
} } | ||
Trace: (StochasticContext, 500) | ||
Trace: (SixtyRequests, 166) (EightyRequests,166) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
StochasticContext{ | ||
features: { | ||
noise_due_service_time: truncnorm(0.0,0.5,0.2,0.2) | ||
} | ||
arms: { | ||
ThreeServers: truncnorm(0.0,1.0,0.715,noise_due_service_time) | ||
SixServers: truncnorm(0.0,1.0,0.614,noise_due_service_time) | ||
EightServers: truncnorm(0.0,1.0,0.508,noise_due_service_time) | ||
ElevenServers: truncnorm(0.0,1.0,0.348,noise_due_service_time) | ||
ThirteenServers: truncnorm(0.0,1.0,0.241,noise_due_service_time) | ||
} } | ||
Trace: (StochasticContext, 500) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
StochasticContext{ | ||
features: { | ||
noise_due_service_time: truncnorm(0.0,0.5,0.2,0.2) | ||
noise_due_service_time: truncnorm(0.0,0.5,0.2,0.2) | ||
service_time: 10 | ||
some_value: 0.715 | ||
} | ||
arms: { | ||
ThreeServers: truncnorm(0.0,myfunction(noise_due_service_time, 20),some_value,0.04) | ||
ThreeServers: normal(0.1,0.1) | ||
} } | ||
Trace: (StochasticContext, 500) |
Oops, something went wrong.