-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsample_data.py
47 lines (45 loc) · 1.65 KB
/
sample_data.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import numpy as np
raw_scores = """71.4,95.0,31.0,,,27.0,29.0,19.0,35.0,29.0
81.0,100.0,,,,8.0,24.0,15.0,26.0,19.0
64.3,81.0,24.0,,,14.0,32.0,21.0,14.0,25.0
47.6,89.0,,,,12.0,21.0,17.0,21.0,16.0
66.7,62.0,18.0,,,14.0,14.0,18.0,24.0,15.0
61.9,80.0,,,,13.0,18.0,18.0,12.0,10.0
33.3,74.0,16.0,,,12.0,21.0,7.0,23.0,11.0
35.7,71.0,19.0,,,10.0,18.0,19.0,18.0,10.0
57.1,74.0,11.0,,,3.0,15.0,14.0,13.0,10.0
54.8,69.0,28.0,,,12.0,13.0,9.0,10.0,12.0
47.6,78.0,19.0,,,4.0,13.0,6.0,9.0,12.0
54.8,65.0,13.0,,,8.0,11.0,8.0,9.0,9.0
54.8,72.0,,,,5.0,7.0,4.0,10.0,10.0
54.8,77.0,11.0,,,2.0,9.0,4.0,2.0,10.0
,96.0,,,,3.0,6.0,2.0,5.0,1.0
26.2,71.0,,,,4.0,6.0,1.0,8.0,4.0
40.5,68.0,25.0,,,1.0,0.0,5.0,3.0,1.0
,60.0,,,,4.0,7.0,1.0,7.0,2.0
40.5,71.0,,,,1.0,2.0,1.0,0.0,0.0
,,,100.0,34.0,15.0,7.0,14.0,14.0,11.0
21.4,75.0,,,,0.0,0.0,3.0,5.0,1.0
14.3,63.0,,,,1.0,6.0,0.0,5.0,2.0
,,,96.0,,2.0,12.0,12.0,7.0,10.0
,,,78.0,45.0,3.0,6.0,3.0,4.0,4.0
,,,95.0,,0.0,5.0,3.0,6.0,0.0
,,,87.0,,1.0,3.0,3.0,7.0,1.0
,,,91.0,15.0,0.0,0.0,3.0,7.0,2.0
,,,87.0,32.0,1.0,2.0,0.0,0.0,0.0
,,,87.0,23.0,0.0,4.0,0.0,4.0,0.0
,,,91.0,,0.0,0.0,0.0,4.0,0.0
,,,92.0,5.0,0.0,0.0,0.0,7.0,1.0
,,,96.0,5.0,0.0,1.0,1.0,2.0,1.0
,,,82.0,11.0,0.0,2.0,0.0,8.0,1.0
,,,70.0,12.0,2.0,6.0,1.0,8.0,1.0
,,,78.0,,1.0,0.0,3.0,4.0,1.0
,,,82.0,11.0,0.0,3.0,5.0,0.0,0.0
,,,74.0,5.0,1.0,5.0,0.0,7.0,0.0
,,,78.0,7.0,0.0,2.0,1.0,4.0,0.0
,,,65.0,,0.0,0.0,0.0,0.0,0.0"""
scores = raw_scores.split("\n")
scores = [[float(x) if x else np.nan for x in line.split(",")] for line in scores]
max_scores = np.array([100, 100, 50, 100, 50, 35, 35, 35, 35, 42])
scores = np.array(scores) / max_scores
weights = np.array([1/6, 1/15, 1/30, 1/30, 1/30, 1/9, 1/9, 1/9, 1/9, 2/9])