Upload gisette.py
Browse files- gisette.py +1 -0
gisette.py
CHANGED
|
@@ -73,6 +73,7 @@ class Gisette(datasets.GeneratorBasedBuilder):
|
|
| 73 |
yield row_id, data_row
|
| 74 |
|
| 75 |
def preprocess(self, data: pandas.DataFrame) -> pandas.DataFrame:
|
|
|
|
| 76 |
for feature in _ENCODING_DICS:
|
| 77 |
encoding_function = partial(self.encode, feature)
|
| 78 |
data.loc[:, feature] = data[feature].apply(encoding_function)
|
|
|
|
| 73 |
yield row_id, data_row
|
| 74 |
|
| 75 |
def preprocess(self, data: pandas.DataFrame) -> pandas.DataFrame:
|
| 76 |
+
data.columns = [f"feature_{i}" for i in range(5000)] + ["class"]
|
| 77 |
for feature in _ENCODING_DICS:
|
| 78 |
encoding_function = partial(self.encode, feature)
|
| 79 |
data.loc[:, feature] = data[feature].apply(encoding_function)
|