Datasets:
Update congress.py
Browse files- congress.py +33 -35
congress.py
CHANGED
@@ -1,5 +1,3 @@
|
|
1 |
-
"""Congress"""
|
2 |
-
|
3 |
from typing import List
|
4 |
|
5 |
import datasets
|
@@ -10,22 +8,22 @@ import pandas
|
|
10 |
VERSION = datasets.Version("1.0.0")
|
11 |
_BASE_FEATURE_NAMES = [
|
12 |
"party",
|
13 |
-
"
|
14 |
-
"
|
15 |
-
"
|
16 |
-
"
|
17 |
-
"
|
18 |
-
"
|
19 |
-
"
|
20 |
-
"
|
21 |
-
"
|
22 |
-
"
|
23 |
-
"
|
24 |
-
"
|
25 |
-
"
|
26 |
-
"
|
27 |
-
"
|
28 |
-
"
|
29 |
]
|
30 |
|
31 |
DESCRIPTION = "Congress dataset from the UCI ML repository."
|
@@ -45,23 +43,23 @@ urls_per_split = {
|
|
45 |
}
|
46 |
features_types_per_config = {
|
47 |
"voting": {
|
48 |
-
|
49 |
-
"
|
50 |
-
"
|
51 |
-
"
|
52 |
-
"
|
53 |
-
"
|
54 |
-
"
|
55 |
-
"
|
56 |
-
"
|
57 |
-
"
|
58 |
-
"
|
59 |
-
"
|
60 |
-
"
|
61 |
-
"
|
62 |
-
"
|
63 |
-
"
|
64 |
-
"party"
|
65 |
}
|
66 |
}
|
67 |
features_per_config = {k: datasets.Features(features_types_per_config[k]) for k in features_types_per_config}
|
|
|
|
|
|
|
1 |
from typing import List
|
2 |
|
3 |
import datasets
|
|
|
8 |
VERSION = datasets.Version("1.0.0")
|
9 |
_BASE_FEATURE_NAMES = [
|
10 |
"party",
|
11 |
+
"vote_on_handicapped_infants_bill",
|
12 |
+
"vote_on_water_project_cost_sharing_bill",
|
13 |
+
"vote_on_adoption_of_the_budget_resolution_bill",
|
14 |
+
"vote_on_physician_fee_freeze_bill",
|
15 |
+
"vote_on_el_salvador_aid_bill",
|
16 |
+
"vote_on_religious_groups_in_schools_bill",
|
17 |
+
"vote_on_anti_satellite_test_ban_bill",
|
18 |
+
"vote_on_aid_to_nicaraguan_contras_bill",
|
19 |
+
"vote_on_mx_missile_bill",
|
20 |
+
"vote_on_immigration_bill",
|
21 |
+
"vote_on_synfuels_corporation_cutback_bill",
|
22 |
+
"vote_on_education_spending_bill",
|
23 |
+
"vote_on_superfund_right_to_sue_bill",
|
24 |
+
"vote_on_crime_bill",
|
25 |
+
"vote_on_duty_free_exports_bill",
|
26 |
+
"vote_on_export_administration_act_south_africa_bill",
|
27 |
]
|
28 |
|
29 |
DESCRIPTION = "Congress dataset from the UCI ML repository."
|
|
|
43 |
}
|
44 |
features_types_per_config = {
|
45 |
"voting": {
|
46 |
+
"vote_on_handicapped_infants_bill", datasets.Value("string"),
|
47 |
+
"vote_on_water_project_cost_sharing_bill", datasets.Value("string"),
|
48 |
+
"vote_on_adoption_of_the_budget_resolution_bill", datasets.Value("string"),
|
49 |
+
"vote_on_physician_fee_freeze_bill", datasets.Value("string"),
|
50 |
+
"vote_on_el_salvador_aid_bill", datasets.Value("string"),
|
51 |
+
"vote_on_religious_groups_in_schools_bill", datasets.Value("string"),
|
52 |
+
"vote_on_anti_satellite_test_ban_bill", datasets.Value("string"),
|
53 |
+
"vote_on_aid_to_nicaraguan_contras_bill", datasets.Value("string"),
|
54 |
+
"vote_on_mx_missile_bill", datasets.Value("string"),
|
55 |
+
"vote_on_immigration_bill", datasets.Value("string"),
|
56 |
+
"vote_on_synfuels_corporation_cutback_bill", datasets.Value("string"),
|
57 |
+
"vote_on_education_spending_bill", datasets.Value("string"),
|
58 |
+
"vote_on_superfund_right_to_sue_bill", datasets.Value("string"),
|
59 |
+
"vote_on_crime_bill", datasets.Value("string"),
|
60 |
+
"vote_on_duty_free_exports_bill", datasets.Value("string"),
|
61 |
+
"vote_on_export_administration_act_south_africa_bill", datasets.Value("string"),
|
62 |
+
"party", datasets.ClassLabel(num_classes=2, names=("democrat", "republican")),
|
63 |
}
|
64 |
}
|
65 |
features_per_config = {k: datasets.Features(features_types_per_config[k]) for k in features_types_per_config}
|