mstz commited on
Commit
2d169db
·
1 Parent(s): a2fabf5

Upload soybean.py

Browse files
Files changed (1) hide show
  1. soybean.py +40 -0
soybean.py CHANGED
@@ -117,6 +117,46 @@ features_types_per_config = {
117
  "class": datasets.ClassLabel(num_classes=19)
118
  }
119
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
  features_per_config = {k: datasets.Features(features_types_per_config[k]) for k in features_types_per_config}
121
 
122
 
 
117
  "class": datasets.ClassLabel(num_classes=19)
118
  }
119
  }
120
+ for c in _ENCODING_DICS["class"].keys():
121
+ features_types_per_config[c] = {
122
+ "date": datasets.Value("string"),
123
+ "plant_stand": datasets.Value("string"),
124
+ "precip": datasets.Value("string"),
125
+ "temp": datasets.Value("string"),
126
+ "hail": datasets.Value("string"),
127
+ "crop_hist": datasets.Value("string"),
128
+ "area_damaged": datasets.Value("string"),
129
+ "severity": datasets.Value("string"),
130
+ "seed_tmt": datasets.Value("string"),
131
+ "germination": datasets.Value("string"),
132
+ "plant_growth": datasets.Value("string"),
133
+ "leaves": datasets.Value("string"),
134
+ "leafspots_halo": datasets.Value("string"),
135
+ "leafspots_marg": datasets.Value("string"),
136
+ "leafspot_size": datasets.Value("string"),
137
+ "leaf_shread": datasets.Value("string"),
138
+ "leaf_malf": datasets.Value("string"),
139
+ "leaf_mild": datasets.Value("string"),
140
+ "stem": datasets.Value("string"),
141
+ "lodging": datasets.Value("string"),
142
+ "stem_cankers": datasets.Value("string"),
143
+ "canker_lesion": datasets.Value("string"),
144
+ "fruiting_bodies": datasets.Value("string"),
145
+ "external decay": datasets.Value("string"),
146
+ "mycelium": datasets.Value("string"),
147
+ "int_discolor": datasets.Value("string"),
148
+ "sclerotia": datasets.Value("string"),
149
+ "fruit_pods": datasets.Value("string"),
150
+ "fruit spots": datasets.Value("string"),
151
+ "seed": datasets.Value("string"),
152
+ "mold_growth": datasets.Value("string"),
153
+ "seed_discolor": datasets.Value("string"),
154
+ "seed_size": datasets.Value("string"),
155
+ "shriveling": datasets.Value("string"),
156
+ "roots": datasets.Value("string"),
157
+ "class": datasets.ClassLabel(num_classes=2, names=("no", "yes"))
158
+ }
159
+
160
  features_per_config = {k: datasets.Features(features_types_per_config[k]) for k in features_types_per_config}
161
 
162