Based on answers from http://VolebnaKalkulacka.sk using Weighted PCA method as described here: https://gist.github.com/michalskop/8514867
Cutting lines with loss function 0 (no errors, perfect cut) are shown.
| # -*- coding: utf-8 -*- | |
| # Fico, Kiska | |
| import csv | |
| import json | |
| import unicodedata | |
| i = 0 | |
| people = [] | |
| votes = [] |
| name | group | a1 | a2 | a3 | a4 | a5 | b1 | b2 | b3 | b4 | b5 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Person 1 | 1 | 0.380952381 | 0.2857142857 | 0.1428571429 | 0.1428571429 | 0.0476190476 | 0.35 | 0.25 | 0.15 | 0.2 | 0.05 | |
| Person 2 | 1 | 0.3 | 0.25 | 0.2 | 0.2 | 0.05 | 0.4 | 0.3 | 0.15 | 0.1 | 0.05 | |
| Person 3 | 1 | 0.31 | 0.23 | 0.2 | 0.2 | 0.06 | 0.3 | 0.25 | 0.18 | 0.15 | 0.12 | |
| Person 4 | 1 | 0.35 | 0.25 | 0.15 | 0.15 | 0.1 | 0.3 | 0.25 | 0.2 | 0.15 | 0.1 | |
| Person 5 | 1 | 0.4 | 0.35 | 0.1 | 0.1 | 0.05 | 0.37 | 0.25 | 0.15 | 0.13 | 0.1 | |
| Person 6 | 1 | 0.25 | 0.2391304348 | 0.2065217391 | 0.2065217391 | 0.097826087 | 0.2696629213 | 0.2471910112 | 0.1685393258 | 0.1685393258 | 0.1460674157 | |
| Person 7 | 1 | 0.375 | 0.3125 | 0.125 | 0.125 | 0.0625 | 0.3157894737 | 0.2631578947 | 0.1578947368 | 0.1578947368 | 0.1052631579 | |
| Person 8 | 1 | 0.3157894737 | 0.2631578947 | 0.1578947368 | 0.1578947368 | 0.1052631579 | 0.2772277228 | 0.2376237624 | 0.1782178218 | 0.1683168317 | 0.1386138614 | |
| Person 9 | 1 | 0.4 | 0.3 | 0.12 | 0.12 | 0.06 | 0.35 | 0.25 | 0.2 | 0.15 | 0.05 |
| # -*- coding: utf-8 -*- | |
| # Fico, Kiska | |
| import csv | |
| import json | |
| import unicodedata | |
| i = 0 | |
| people = [] | |
| votes = [] |
| # -*- coding: utf-8 -*- | |
| import csv | |
| import json | |
| import unicodedata | |
| i = 0 | |
| people = [] | |
| votes = [] | |
| winners = {} |
Based on answers from http://VolebnaKalkulacka.sk using Weighted PCA method as described here: https://gist.github.com/michalskop/8514867
Cutting lines with loss function 0 (no errors, perfect cut) are shown.
Based on answers from http://VolebnaKalkulacka.sk
Values between 0 and 100.
| name | S | A | D | F | group | white | |
|---|---|---|---|---|---|---|---|
| Person-1 | 5 | 15 | 50 | 95 | 3 | 0 | |
| Person-2 | 5 | 30 | 80 | 98 | 3 | 0 | |
| Person-3 | 2 | 20 | 50 | 90 | 3 | 0 | |
| Person-4 | 1 | 10 | 50 | 98 | 3 | 0 | |
| Person-5 | 12 | 24 | 78 | 95 | 3 | 0 | |
| Person-6 | 5 | 10 | 65 | 98 | 3 | 0 | |
| Person-7 | 1 | 12 | 65 | 97 | 3 | 0 | |
| Person-8 | 5 | 20 | 68.5 | 94 | 3 | 0 | |
| Person-9 | 10 | 20 | 50 | 90 | 3 | 0 |
| # -*- coding: utf-8 -*- | |
| import json | |
| import csv | |
| import string | |
| data = [] | |
| i = 0 | |
| with open("geocoded_adj.csv","r") as fin: | |
| finreader = csv.reader(fin,delimiter="\t") |