mirror of
https://github.com/webclinic017/drift.git
synced 2026-08-14 03:18:06 +00:00
feat(Transformations): replaced feature selection pre-processing step with online version (with cache) (#170)
* feat(Transformations): removed feature-selection pre-processing step completely * fix(Core): removed unnecessary `original_X` * fix(Transformations): use the X_expanding_window to transform subsequent data * fix(RFE): should check for model correctly * fix(Config): only re-train the model every 40 timestamp * fix(MetaLabeling): pass in the correct X to meta-labeling step * fix(Transformation): PCA should at least keep as many features as sliding_window_size * feat(Transformations): cache transformations across the same asset * fix(Tests): missing preloaded_transformations arg * chore(Config): got rid of unnecessary 'classification_models' and 'regression_models' dictionary keys
This commit is contained in:
@@ -21,10 +21,10 @@ def __preprocess_feature_extractors_config(data_dict: dict) -> dict:
|
||||
return data_dict
|
||||
|
||||
def __preprocess_model_config(model_config:dict, method:str) -> dict:
|
||||
model_map, _, _, _, _ = get_model_map(model_config)
|
||||
model_config['primary_models'] = [(model_name, model_map[method + '_models'][model_name]) for model_name in model_config['primary_models']]
|
||||
model_map = get_model_map(model_config)
|
||||
model_config['primary_models'] = [(model_name, model_map['primary_models'][model_name]) for model_name in model_config['primary_models']]
|
||||
if len(model_config['meta_labeling_models']) > 0:
|
||||
model_config['meta_labeling_models'] = [(model_name, model_map[method + '_models'][model_name]) for model_name in model_config['meta_labeling_models']]
|
||||
model_config['meta_labeling_models'] = [(model_name, model_map['primary_models'][model_name]) for model_name in model_config['meta_labeling_models']]
|
||||
if model_config['ensemble_model'] is not None:
|
||||
model_config['ensemble_model'] = (model_config['ensemble_model'], model_map['ensemble_models'][model_config['ensemble_model']])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user