Datasets:
Update yeast.py
Browse files
yeast.py
CHANGED
|
@@ -221,8 +221,8 @@ class Yeast(datasets.GeneratorBasedBuilder):
|
|
| 221 |
encoding_function = partial(self.encode, feature)
|
| 222 |
data.loc[:, feature] = data[feature].apply(encoding_function)
|
| 223 |
|
| 224 |
-
|
| 225 |
-
|
| 226 |
|
| 227 |
if self.config.name == "yeast_0":
|
| 228 |
data["class"] = data["class"].apply(lambda x: 1 if x == 0 else 0)
|
|
|
|
| 221 |
encoding_function = partial(self.encode, feature)
|
| 222 |
data.loc[:, feature] = data[feature].apply(encoding_function)
|
| 223 |
|
| 224 |
+
data["erl"] = data["erl"].apply(lambda x: True if x == 1 else False)
|
| 225 |
+
data = data.astype({"erl": "bool"})
|
| 226 |
|
| 227 |
if self.config.name == "yeast_0":
|
| 228 |
data["class"] = data["class"].apply(lambda x: 1 if x == 0 else 0)
|