-
Notifications
You must be signed in to change notification settings - Fork 0
/
statAnalysis.py
31 lines (22 loc) · 1.1 KB
/
statAnalysis.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
def getDataByRooms(data, parametersToTest, nbRobots=None, parameterY = "measuredTiles"):
rooms = data["roomName"].unique()
series = [[] for i in range(len(parametersToTest))]
for j, parameter in enumerate(parametersToTest):
for k, room in enumerate(rooms):
series[j].append(data[
(data["rpb_sel_method"] == parameter)
& (data["roomName"] == room)][parameterY].mean())
return series, rooms
def getDataByNbRPB(data, parameterLabel, parametersToTest, parameterY = "measuredTiles"):
nbRefPointBots = data["nbRefPointBots"].unique()
series = [[] for j in range(len(parametersToTest))]
for i, nb in enumerate(data["nbRefPointBots"].unique()):
for j, parameter in enumerate(parametersToTest):
series[j].append(data[(data["nbRefPointBots"] == nb) & (data[parameterLabel] == parameter) ][parameterY].mean())
return series, nbRefPointBots
def getAllParams(df):
for key in df:
data = df[key].unique()
if len(data) < 30:
print(key," : ", data)
else : print(key, "length : ", len(data))