zhuxi 2 anni fa
parent
commit
4527bdf677
1 ha cambiato i file con 8 aggiunte e 0 eliminazioni
  1. 8 0
      LIB/MIDDLE/FaultClass/V1_0_0/faultclass.py

+ 8 - 0
LIB/MIDDLE/FaultClass/V1_0_0/faultclass.py

@@ -176,6 +176,14 @@ def arrange(result,result_final,start_time):
             res_update=res_update.append(result0)
     return res_new,res_update
 
+def arrange2(dataorg,df_res,start_time,fault_name):
+    res_new=df_res.copy()
+    res_update=pd.DataFrame()
+    if len(dataorg)>0:
+        dataorg=dataorg[dataorg['fault_class']==fault_name]
+        res_new,res_update=arrange(df_res,dataorg,start_time)
+    return res_new,res_update
+
 # Step8 Process
 def pred(data_fea,model,scaler,col,end_time,time_steps):
     df_res=pd.DataFrame()