diff --git a/config_jingbo.py b/config_jingbo.py index 74ede77..e77461c 100644 --- a/config_jingbo.py +++ b/config_jingbo.py @@ -198,7 +198,7 @@ table_name = 'v_tbl_crude_oil_warning' # 开关 is_train = True # 是否训练 -is_debug = True # 是否调试 +is_debug = False # 是否调试 is_eta = True # 是否使用eta接口 is_market = True # 是否通过市场信息平台获取特征 ,在is_eta 为true 的情况下生效 is_timefurture = True # 是否使用时间特征 @@ -206,7 +206,7 @@ is_fivemodels = False # 是否使用之前保存的最佳的5个模型 is_edbcode = False # 特征使用edbcoding列表中的 is_edbnamelist = False # 自定义特征,对应上面的edbnamelist is_update_eta = False # 预测结果上传到eta -is_update_report = False # 是否上传报告 +is_update_report = True # 是否上传报告 is_update_warning_data = False # 是否上传预警数据 is_update_predict_value = True # 是否上传预测值到市场信息平台 is_del_corr = 0.6 # 是否删除相关性高的特征,取值为 0-1 ,0 为不删除,0.6 表示删除相关性小于0.6的特征 diff --git a/config_jingbo_yuedu.py b/config_jingbo_yuedu.py index 7053d32..d1afac7 100644 --- a/config_jingbo_yuedu.py +++ b/config_jingbo_yuedu.py @@ -194,7 +194,7 @@ table_name = 'v_tbl_crude_oil_warning' # 开关 -is_train = False # 是否训练 +is_train = True # 是否训练 is_debug = False # 是否调试 is_eta = True # 是否使用eta接口 is_market = True # 是否通过市场信息平台获取特征 ,在is_eta 为true 的情况下生效 @@ -203,7 +203,7 @@ is_fivemodels = False # 是否使用之前保存的最佳的5个模型 is_edbcode = False # 特征使用edbcoding列表中的 is_edbnamelist = False # 自定义特征,对应上面的edbnamelist is_update_eta = False # 预测结果上传到eta -is_update_report = False # 是否上传报告 +is_update_report = True # 是否上传报告 is_update_warning_data = False # 是否上传预警数据 is_update_predict_value = True # 是否上传预测值到市场信息平台 is_del_corr = 0.6 # 是否删除相关性高的特征,取值为 0-1 ,0 为不删除,0.6 表示删除相关性小于0.6的特征 diff --git a/config_jingbo_zhoudu.py b/config_jingbo_zhoudu.py index f0ac4e2..303f484 100644 --- a/config_jingbo_zhoudu.py +++ b/config_jingbo_zhoudu.py @@ -195,14 +195,14 @@ table_name = 'v_tbl_crude_oil_warning' # 开关 is_train = True # 是否训练 is_debug = False # 是否调试 -is_eta = False # 是否使用eta接口 +is_eta = True # 是否使用eta接口 is_market = True # 是否通过市场信息平台获取特征 ,在is_eta 为true 的情况下生效 is_timefurture = True # 是否使用时间特征 is_fivemodels = False # 是否使用之前保存的最佳的5个模型 is_edbcode = False # 特征使用edbcoding列表中的 is_edbnamelist = False # 自定义特征,对应上面的edbnamelist is_update_eta = False # 预测结果上传到eta -is_update_report = False # 是否上传报告 +is_update_report = True # 是否上传报告 is_update_warning_data = False # 是否上传预警数据 is_update_predict_value = True # 是否上传预测值到市场信息平台 is_del_corr = 0.6 # 是否删除相关性高的特征,取值为 0-1 ,0 为不删除,0.6 表示删除相关性小于0.6的特征 diff --git a/main_yuanyou.py b/main_yuanyou.py index 84e32ba..e16af00 100644 --- a/main_yuanyou.py +++ b/main_yuanyou.py @@ -105,17 +105,20 @@ def push_market_value(): # 准备要推送的数据 first_mean = predictdata_df['top_models_mean'].iloc[0] last_mean = predictdata_df['top_models_mean'].iloc[-1] + # 保留两位小数 + first_mean = round(first_mean, 2) + last_mean = round(last_mean, 2) predictdata = [ { "dataItemNo": global_config['bdwd_items']['ciri'], - "dataDate": global_config['end_time'], + "dataDate": global_config['end_time'].replace('-',''), "dataStatus": "add", "dataValue": first_mean }, { "dataItemNo": global_config['bdwd_items']['benzhou'], - "dataDate": global_config['end_time'], + "dataDate": global_config['end_time'].replace('-',''), "dataStatus": "add", "dataValue": last_mean } diff --git a/main_yuanyou_yuedu.py b/main_yuanyou_yuedu.py index 60bb875..ba468a8 100644 --- a/main_yuanyou_yuedu.py +++ b/main_yuanyou_yuedu.py @@ -107,29 +107,34 @@ def push_market_value(): cieryue_mean = predictdata_df['top_models_mean'].iloc[1] cisanyue_mean = predictdata_df['top_models_mean'].iloc[2] cisieryue_mean = predictdata_df['top_models_mean'].iloc[3] + # 保留两位小数 + ciyue_mean = round(ciyue_mean, 2) + cieryue_mean = round(cieryue_mean, 2) + cisanyue_mean = round(cisanyue_mean, 2) + cisieryue_mean = round(cisieryue_mean, 2) predictdata = [ { "dataItemNo": global_config['bdwd_items']['ciyue'], - "dataDate": global_config['end_time'], + "dataDate": global_config['end_time'].replace('-',''), "dataStatus": "add", "dataValue": ciyue_mean }, { "dataItemNo": global_config['bdwd_items']['cieryue'], - "dataDate": global_config['end_time'], + "dataDate": global_config['end_time'].replace('-',''), "dataStatus": "add", "dataValue": cieryue_mean }, { "dataItemNo": global_config['bdwd_items']['cisanyue'], - "dataDate": global_config['end_time'], + "dataDate": global_config['end_time'].replace('-',''), "dataStatus": "add", "dataValue": cisanyue_mean }, { "dataItemNo": global_config['bdwd_items']['cisiyue'], - "dataDate": global_config['end_time'], + "dataDate": global_config['end_time'].replace('-',''), "dataStatus": "add", "dataValue": cisieryue_mean } diff --git a/main_yuanyou_zhoudu.py b/main_yuanyou_zhoudu.py index 066f5b2..e8ae623 100644 --- a/main_yuanyou_zhoudu.py +++ b/main_yuanyou_zhoudu.py @@ -105,17 +105,20 @@ def push_market_value(): # 准备要推送的数据 first_mean = predictdata_df['top_models_mean'].iloc[0] last_mean = predictdata_df['top_models_mean'].iloc[-1] + # 保留两位小数 + first_mean = round(first_mean, 2) + last_mean = round(last_mean, 2) predictdata = [ { "dataItemNo": global_config['bdwd_items']['cizhou'], - "dataDate": global_config['end_time'], + "dataDate": global_config['end_time'].replace('-',''), "dataStatus": "add", "dataValue": first_mean }, { "dataItemNo": global_config['bdwd_items']['gezhou'], - "dataDate": global_config['end_time'], + "dataDate": global_config['end_time'].replace('-',''), "dataStatus": "add", "dataValue": last_mean } diff --git a/models/nerulforcastmodels.py b/models/nerulforcastmodels.py index 8962737..2cd550c 100644 --- a/models/nerulforcastmodels.py +++ b/models/nerulforcastmodels.py @@ -165,7 +165,7 @@ def ex_Model(df, horizon, input_size, train_steps, val_check_steps, early_stop_p # VanillaTransformer(h=horizon, input_size=input_size, max_steps=train_steps, val_check_steps=val_check_steps, scaler_type='standard', ), //报错了 # Autoformer(h=horizon, input_size=input_size, max_steps=train_steps, val_check_steps=val_check_steps, scaler_type='standard', ), //报错了 - NBEATS(h=horizon, input_size=input_size, max_steps=train_steps, val_check_steps=val_check_steps, scaler_type='standard', ), + # NBEATS(h=horizon, input_size=input_size, max_steps=train_steps, val_check_steps=val_check_steps, scaler_type='standard', ), # NBEATSx (h=horizon, input_size=input_size, max_steps=train_steps, val_check_steps=val_check_steps, scaler_type='standard',activation='ReLU', ), //报错 # HINT(h=horizon),