Datasets:
Update isolet.py
Browse files
isolet.py
CHANGED
@@ -69,10 +69,8 @@ class Isolet(datasets.GeneratorBasedBuilder):
|
|
69 |
for row_id, row in data.iterrows():
|
70 |
data_row = dict(row)
|
71 |
data_row["617"] = int(data_row["617"])
|
72 |
-
print(row_id)
|
73 |
|
74 |
yield row_id, data_row
|
75 |
-
print("\n\n\n")
|
76 |
|
77 |
def preprocess(self, data: pandas.DataFrame, config: str = DEFAULT_CONFIG) -> pandas.DataFrame:
|
78 |
data.columns = [str(i) for i in range(618)]
|
@@ -81,7 +79,4 @@ class Isolet(datasets.GeneratorBasedBuilder):
|
|
81 |
data.loc[:, "617"] = data["617"].apply(lambda x: int(x) - 1)
|
82 |
data = data.astype({str(i): "float64" for i in range(617)})
|
83 |
|
84 |
-
print(data.dtypes)
|
85 |
-
print(sorted(data["617"].unique()))
|
86 |
-
|
87 |
return data
|
|
|
69 |
for row_id, row in data.iterrows():
|
70 |
data_row = dict(row)
|
71 |
data_row["617"] = int(data_row["617"])
|
|
|
72 |
|
73 |
yield row_id, data_row
|
|
|
74 |
|
75 |
def preprocess(self, data: pandas.DataFrame, config: str = DEFAULT_CONFIG) -> pandas.DataFrame:
|
76 |
data.columns = [str(i) for i in range(618)]
|
|
|
79 |
data.loc[:, "617"] = data["617"].apply(lambda x: int(x) - 1)
|
80 |
data = data.astype({str(i): "float64" for i in range(617)})
|
81 |
|
|
|
|
|
|
|
82 |
return data
|