Datasets:
Upload hayes_roth.py
Browse files- hayes_roth.py +3 -1
hayes_roth.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
from typing import List
|
2 |
-
from functools import partial
|
3 |
|
4 |
import datasets
|
5 |
|
@@ -115,5 +114,8 @@ class Hayes(datasets.GeneratorBasedBuilder):
|
|
115 |
data.loc[:, "class"] = data["class"].apply(lambda x: 1 if x == 2 else 0)
|
116 |
elif self.config.name == "hayes_3":
|
117 |
data.loc[:, "class"] = data["class"].apply(lambda x: 1 if x == 3 else 0)
|
|
|
|
|
|
|
118 |
|
119 |
return data
|
|
|
1 |
from typing import List
|
|
|
2 |
|
3 |
import datasets
|
4 |
|
|
|
114 |
data.loc[:, "class"] = data["class"].apply(lambda x: 1 if x == 2 else 0)
|
115 |
elif self.config.name == "hayes_3":
|
116 |
data.loc[:, "class"] = data["class"].apply(lambda x: 1 if x == 3 else 0)
|
117 |
+
else:
|
118 |
+
data.loc[:, "class"] = data["class"].apply(lambda x: x - 1)
|
119 |
+
|
120 |
|
121 |
return data
|