def get_stack_model(configPath_dict, stock, days): config = { 'xgb': load_best_config(configPath_dict['xgb'])[stock][days]['model_config'], 'rf': load_best_config(configPath_dict['rf'])[stock][days]['model_config'], 'svc': load_best_config(configPath_dict['svc'])[stock][days]['model_config'], } return mz.stacking_avg_model(config)
def get_stack_model(stock, days): configPath = { 'svc': '/home/ubuntu/shared/workspace/etf_prediction/trainer/config/20180525/best_config_svc_speicalDate.pkl', 'xgb': '/home/ubuntu/shared/workspace/etf_prediction/trainer/config/20180525/best_config_xgb_speicalDate.pkl', 'rf': '/home/ubuntu/shared/workspace/etf_prediction/trainer/config/20180525/best_config_rf_speicalDate.pkl' } config = { 'xgb': load_best_config(configPath['xgb'])[stock][days]['model_config'], 'rf': load_best_config(configPath['rf'])[stock][days]['model_config'], 'svc': load_best_config(configPath['svc'])[stock][days]['model_config'], } return mz.stacking_avg_model(config)