1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-10 14:26:56 +08:00

Add filter_pipe API

This commit is contained in:
Jactus
2021-01-26 12:33:36 +08:00
committed by you-n-g
parent 828993b397
commit c0e7cbc983
2 changed files with 18 additions and 2 deletions

View File

@@ -54,6 +54,7 @@ class Alpha360(DataHandlerLP):
learn_processors=_DEFAULT_LEARN_PROCESSORS,
fit_start_time=None,
fit_end_time=None,
filter_pipe=None,
**kwargs,
):
infer_processors = check_transform_proc(infer_processors, fit_start_time, fit_end_time)
@@ -66,6 +67,7 @@ class Alpha360(DataHandlerLP):
"feature": self.get_feature_config(),
"label": kwargs.get("label", self.get_label_config()),
},
"filter_pipe": filter_pipe,
},
}
@@ -138,6 +140,7 @@ class Alpha158(DataHandlerLP):
fit_start_time=None,
fit_end_time=None,
process_type=DataHandlerLP.PTYPE_A,
filter_pipe=None,
**kwargs,
):
infer_processors = check_transform_proc(infer_processors, fit_start_time, fit_end_time)
@@ -146,7 +149,11 @@ class Alpha158(DataHandlerLP):
data_loader = {
"class": "QlibDataLoader",
"kwargs": {
"config": {"feature": self.get_feature_config(), "label": kwargs.get("label", self.get_label_config())},
"config": {
"feature": self.get_feature_config(),
"label": kwargs.get("label", self.get_label_config()),
},
"filter_pipe": filter_pipe,
},
}
super().__init__(