Datasets:
Upload seeds.py
Browse files
seeds.py
CHANGED
@@ -118,11 +118,11 @@ class Seeds(datasets.GeneratorBasedBuilder):
|
|
118 |
data["class"] = data["class"].apply(lambda x: x - 1)
|
119 |
|
120 |
if self.config.name == "seeds_0":
|
121 |
-
data["
|
122 |
elif self.config.name == "seeds_1":
|
123 |
-
data["
|
124 |
elif self.config.name == "seeds_2":
|
125 |
-
data["
|
126 |
|
127 |
for feature in _ENCODING_DICS:
|
128 |
encoding_function = partial(self.encode, feature)
|
|
|
118 |
data["class"] = data["class"].apply(lambda x: x - 1)
|
119 |
|
120 |
if self.config.name == "seeds_0":
|
121 |
+
data["class"] = data["class"].apply(lambda x: 1 if x == 0 else 0)
|
122 |
elif self.config.name == "seeds_1":
|
123 |
+
data["class"] = data["class"].apply(lambda x: 1 if x == 1 else 0)
|
124 |
elif self.config.name == "seeds_2":
|
125 |
+
data["class"] = data["class"].apply(lambda x: 1 if x == 2 else 0)
|
126 |
|
127 |
for feature in _ENCODING_DICS:
|
128 |
encoding_function = partial(self.encode, feature)
|