Datasets:
Upload splice.py
Browse files
splice.py
CHANGED
@@ -331,13 +331,13 @@ class Splice(datasets.GeneratorBasedBuilder):
|
|
331 |
def preprocess(self, data: pandas.DataFrame) -> pandas.DataFrame:
|
332 |
if self.config.name == "splice_IE":
|
333 |
data["class"] = data["class"].apply(lambda x: 1 if x == "IE" else 0)
|
334 |
-
data = data.rename(columns={"class"
|
335 |
elif self.config.name == "splice_IE":
|
336 |
data["class"] = data["class"].apply(lambda x: 1 if x == "EI" else 0)
|
337 |
-
data = data.rename(columns={"class"
|
338 |
elif self.config.name == "splice_N":
|
339 |
data["class"] = data["class"].apply(lambda x: 1 if x == "N" else 0)
|
340 |
-
data = data.rename(columns={"class"
|
341 |
else:
|
342 |
data["class"] = data["class"].apply(lambda x: {
|
343 |
"EI": 0,
|
|
|
331 |
def preprocess(self, data: pandas.DataFrame) -> pandas.DataFrame:
|
332 |
if self.config.name == "splice_IE":
|
333 |
data["class"] = data["class"].apply(lambda x: 1 if x == "IE" else 0)
|
334 |
+
data = data.rename(columns={"class": "is_ie"})
|
335 |
elif self.config.name == "splice_IE":
|
336 |
data["class"] = data["class"].apply(lambda x: 1 if x == "EI" else 0)
|
337 |
+
data = data.rename(columns={"class": "is_ei"})
|
338 |
elif self.config.name == "splice_N":
|
339 |
data["class"] = data["class"].apply(lambda x: 1 if x == "N" else 0)
|
340 |
+
data = data.rename(columns={"class": "is_n"})
|
341 |
else:
|
342 |
data["class"] = data["class"].apply(lambda x: {
|
343 |
"EI": 0,
|