Datasets:
Upload lrs.py
Browse files
lrs.py
CHANGED
@@ -1139,7 +1139,6 @@ class Lrs(datasets.GeneratorBasedBuilder):
|
|
1139 |
def preprocess(self, data: pandas.DataFrame) -> pandas.DataFrame:
|
1140 |
data.drop("ID-type", axis="columns", inplace=True)
|
1141 |
data = data[list(features_types_per_config["lrs"].keys())]
|
1142 |
-
print(data["lrs_class"].apply(lambda x: x if x < 10 else x // 10).unique())
|
1143 |
data.loc[:, "lrs_class"] = data["lrs_class"].apply(lambda x: x if x < 10 else x // 10)
|
1144 |
|
1145 |
if self.config.name == "lrs_0":
|
@@ -1161,4 +1160,6 @@ class Lrs(datasets.GeneratorBasedBuilder):
|
|
1161 |
if self.config.name == "lrs_8":
|
1162 |
data.loc[:, "lrs_class"] = data["lrs_class"].apply(lambda x: 1 if x == 8 else 0)
|
1163 |
|
|
|
|
|
1164 |
return data
|
|
|
1139 |
def preprocess(self, data: pandas.DataFrame) -> pandas.DataFrame:
|
1140 |
data.drop("ID-type", axis="columns", inplace=True)
|
1141 |
data = data[list(features_types_per_config["lrs"].keys())]
|
|
|
1142 |
data.loc[:, "lrs_class"] = data["lrs_class"].apply(lambda x: x if x < 10 else x // 10)
|
1143 |
|
1144 |
if self.config.name == "lrs_0":
|
|
|
1160 |
if self.config.name == "lrs_8":
|
1161 |
data.loc[:, "lrs_class"] = data["lrs_class"].apply(lambda x: 1 if x == 8 else 0)
|
1162 |
|
1163 |
+
print("Done w/ preprocessing\n\n\n\n\n")
|
1164 |
+
|
1165 |
return data
|