Skip to content

Commit

Permalink
add mappings for more features
Browse files Browse the repository at this point in the history
  • Loading branch information
jpgard committed Dec 29, 2023
1 parent 3a61d00 commit 10615e6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
11 changes: 9 additions & 2 deletions tableshift/datasets/german.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,16 @@
"applicants",
value_mapping={
1: "greater than or equal to median age",
0: "not greater than or equal to median age"
'1.0': "greater than or equal to median age",
0: "not greater than or equal to median age",
'0.0': "not greater than or equal to median age"
}),
Feature("sex", cat_dtype, value_mapping={1: "male", 0: "female"}),
Feature("sex", cat_dtype, value_mapping={
1: "male",
'1.0': "male",
0: "female",
'0.0': "female",
}),
Feature("other_installment", cat_dtype,
description="Other installment plans",
name_extended="Other installment plans",
Expand Down
6 changes: 3 additions & 3 deletions tableshift/datasets/uci.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,10 @@
Feature('buying', cat_dtype, name_extended='buying price'),
Feature('maint', cat_dtype, name_extended='maintenance price'),
Feature('doors', cat_dtype, name_extended='number of doors'),
Feature('persons', cat_dtype),
Feature('persons', cat_dtype, name_extended='capacity in terms of persons to carry'),
Feature('lug_boot', cat_dtype,
name_extended='capacity in terms of persons'),
Feature('safety', cat_dtype, name_extended='safety level'),
name_extended='the size of luggage boot'),
Feature('safety', cat_dtype, name_extended='estimated safety level of the car'),
Feature('class', cat_dtype, is_target=True,
name_extended='car acceptability',
value_mapping={
Expand Down

0 comments on commit 10615e6

Please sign in to comment.