mstz commited on
Commit
344b4bc
1 Parent(s): e89b705

Upload nbfi.py

Browse files
Files changed (1) hide show
  1. nbfi.py +39 -37
nbfi.py CHANGED
@@ -91,43 +91,45 @@ _BASE_FEATURE_NAMES = [
91
  "has_defaulted"
92
  ]
93
  features_types_per_config = {
94
- "income": datasets.Value("float32"),
95
- "owns_a_car": datasets.Value("bool"),
96
- "owns_a_bike": datasets.Value("bool"),
97
- "has_an_active_loan": datasets.Value("bool"),
98
- "owns_a_house": datasets.Value("bool"),
99
- "nr_children": datasets.Value("int8"),
100
- "credit": datasets.Value("float32"),
101
- "loan_annuity": datasets.Value("float32"),
102
- "accompanied_by": datasets.Value("string"),
103
- "income_type": datasets.Value("string"),
104
- "education_level": datasets.Value("float32"),
105
- "marital_status": datasets.Value("float32"),
106
- "is_male": datasets.Value("bool"),
107
- "type_of_contract": datasets.Value("string"),
108
- "type_of_housing": datasets.Value("string"),
109
- "residence_density": datasets.Value("float32"),
110
- "age_in_days": datasets.Value("int32"),
111
- "consecutive_days_of_employment": datasets.Value("int16"),
112
- "nr_days_since_last_registration_change": datasets.Value("int32"),
113
- "nr_days_since_last_document_change": datasets.Value("int32"),
114
- "owned_a_house_for_nr_days": datasets.Value("int32"),
115
- "has_provided_a_mobile_number": datasets.Value("bool"),
116
- "has_provided_a_home_number": datasets.Value("bool"),
117
- "was_reachable_at_work": datasets.Value("bool"),
118
- "job": datasets.Value("string"),
119
- "nr_family_members": datasets.Value("int8"),
120
- "city_rating": datasets.Value("int8"),
121
- "weekday_of_application": datasets.Value("int8"),
122
- "hour_of_application": datasets.Value("float32"),
123
- "same_residence_and_home": datasets.Value("bool"),
124
- "same_work_and_home": datasets.Value("bool"),
125
- "score_1": datasets.Value("float32"),
126
- "score_2": datasets.Value("float32"),
127
- "score_3": datasets.Value("float32"),
128
- "nr_defaults_in_social_circle": datasets.Value("int8"),
129
- "inquiries_in_last_year": datasets.Value("float32"),
130
- "has_defaulted": datasets.ClassLabel(num_classes=2, names=("no", "yes"))
 
 
131
  }
132
  _ENCODING_DICS = {}
133
  _EDUCATION_ENCODING = {
 
91
  "has_defaulted"
92
  ]
93
  features_types_per_config = {
94
+ "default": {
95
+ "income": datasets.Value("float32"),
96
+ "owns_a_car": datasets.Value("bool"),
97
+ "owns_a_bike": datasets.Value("bool"),
98
+ "has_an_active_loan": datasets.Value("bool"),
99
+ "owns_a_house": datasets.Value("bool"),
100
+ "nr_children": datasets.Value("int8"),
101
+ "credit": datasets.Value("float32"),
102
+ "loan_annuity": datasets.Value("float32"),
103
+ "accompanied_by": datasets.Value("string"),
104
+ "income_type": datasets.Value("string"),
105
+ "education_level": datasets.Value("float32"),
106
+ "marital_status": datasets.Value("float32"),
107
+ "is_male": datasets.Value("bool"),
108
+ "type_of_contract": datasets.Value("string"),
109
+ "type_of_housing": datasets.Value("string"),
110
+ "residence_density": datasets.Value("float32"),
111
+ "age_in_days": datasets.Value("int32"),
112
+ "consecutive_days_of_employment": datasets.Value("int16"),
113
+ "nr_days_since_last_registration_change": datasets.Value("int32"),
114
+ "nr_days_since_last_document_change": datasets.Value("int32"),
115
+ "owned_a_house_for_nr_days": datasets.Value("int32"),
116
+ "has_provided_a_mobile_number": datasets.Value("bool"),
117
+ "has_provided_a_home_number": datasets.Value("bool"),
118
+ "was_reachable_at_work": datasets.Value("bool"),
119
+ "job": datasets.Value("string"),
120
+ "nr_family_members": datasets.Value("int8"),
121
+ "city_rating": datasets.Value("int8"),
122
+ "weekday_of_application": datasets.Value("int8"),
123
+ "hour_of_application": datasets.Value("float32"),
124
+ "same_residence_and_home": datasets.Value("bool"),
125
+ "same_work_and_home": datasets.Value("bool"),
126
+ "score_1": datasets.Value("float32"),
127
+ "score_2": datasets.Value("float32"),
128
+ "score_3": datasets.Value("float32"),
129
+ "nr_defaults_in_social_circle": datasets.Value("int8"),
130
+ "inquiries_in_last_year": datasets.Value("float32"),
131
+ "has_defaulted": datasets.ClassLabel(num_classes=2, names=("no", "yes"))
132
+ }
133
  }
134
  _ENCODING_DICS = {}
135
  _EDUCATION_ENCODING = {