zhuxi пре 2 година
родитељ
комит
129cb1b1b6
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      LIB/MIDDLE/FaultDetection/V1_0_2/aelstm.py

+ 2 - 1
LIB/MIDDLE/FaultDetection/V1_0_2/aelstm.py

@@ -235,7 +235,8 @@ def threshold(res,group,end_time):
         df_res=df_res[((df_res['diff_min']>10) & (df_res['AnoScoreV_sum_max']>35)) | (df_res['SOC[%]']<93)| (df_res['AnoScoreT_sum_max']>5) | (df_res['AnoScoreV_max_max']>6) | (df_res['AnoScoreT_max_max']>2)]
     df_res=df_res.drop(['n_split','product_id_y','AnoScoreV_sum_start','AnoScoreV_max_start','AnoScoreT_sum_start','AnoScoreT_max_start','AnoScoreV_sum_end','AnoScoreT_sum_end','AnoScoreT_max_end','AnoScoreV_max_end','最大其他温度'],axis=1,errors='ignore')
     df_res=df_res.rename(columns = {"product_id_x": "product_id"})
-    df_res2=df_res[['product_id','start_time','end_time','diff_min','SOC[%]','AnoScoreV_sum_max','AnoScoreV_max_max','AnoScoreT_sum_max','AnoScoreT_max_max']]
+    df_res=df_res.rename(columns = {"SOC[%]": "SOC"})
+    df_res2=df_res[['product_id','start_time','end_time','diff_min','SOC','AnoScoreV_sum_max','AnoScoreV_max_max','AnoScoreT_sum_max','AnoScoreT_max_max']]
     df_res2['start_time']=list(map(lambda x:str(x),list(df_res2['start_time'])))
     df_res2['end_time']=list(map(lambda x:str(x),list(df_res2['end_time'])))
     return df_res2,diff