lmstack 3 anos atrás
pai
commit
4be6d91adf

+ 4 - 0
LIB/MIDDLE/OutlierDetection/VoltOutlier/V_1_0_0/sta.py

@@ -22,6 +22,8 @@ def cal_volt_uniform(dfin, volt_column, window=10, step=5, threshold=3):
     # 电压偏离度
     mean = df_volt_rolling.mean(axis=1)
     std = df_volt_rolling.std(axis=1)
+    # mean = [np.array(sorted(x)[1:-1]).mean() for x in df_volt_rolling.values]
+    # std = [np.array(sorted(x)[1:-1]).std() for x in df_volt_rolling.values]
     df_volt_rolling_norm = df_volt_rolling.sub(mean, axis=0).div(std,axis=0)
     df_volt_rolling_norm = df_volt_rolling_norm.reset_index(drop=True)
     return df_volt_rolling_norm, time_list
@@ -54,6 +56,8 @@ def cal_voltdiff_uniform(dfin, volt_column, window=10, step=5, window2=10, step2
     time_list = time_list[window2-1::step2] 
     mean = df_voltdiff_rolling.mean(axis=1)
     std = df_voltdiff_rolling.std(axis=1)
+    # mean = [np.array(sorted(x)[1:-1]).mean() for x in df_voltdiff_rolling.values]
+    # std = [np.array(sorted(x)[1:-1]).std() for x in df_voltdiff_rolling.values]
     df_voltdiff_rolling_norm = df_voltdiff_rolling.sub(mean, axis=0).div(std,axis=0)
     df_voltdiff_rolling_norm = df_voltdiff_rolling_norm.reset_index(drop=True)
     return df_voltdiff_rolling_norm, time_list

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 9
LIB/MIDDLE/OutlierDetection/VoltOutlier/main.ipynb


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff