1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-12 07:16:54 +08:00

update dnn

This commit is contained in:
bxdd
2020-11-27 13:00:14 +08:00
parent 52c7076917
commit a144a9c3c6
4 changed files with 36 additions and 19 deletions

View File

@@ -90,7 +90,17 @@ class DropnaLabel(DropnaProcessor):
return False
class DropCol(Processor):
def __init__(self, col_list=[]):
self.col_list = col_list
def __call__(self, df):
if isinstance(df.columns, pd.MultiIndex):
mask = df.columns.get_level_values(-1).isin(self.col_list)
else:
mask = df.columns.isin(self.col_list)
return df.loc[:, ~mask]
class TanhProcess(Processor):
""" Use tanh to process noise data"""