Commit 2ee06f88 authored by cif2cif's avatar cif2cif
Browse files

Actualizado a 37 casas

parent 95f6dbcf
......@@ -21,8 +21,9 @@ def main():
data_dir_path = './data'
model_dir_path = './models'
normal_data_path = '/normal/houses_concatenated.pkl'
attack_data_path = '/anomaly_20/labels_df/house_0.pkl'
# attack_data_path = '/anomaly_20/labels_df/house_0.pkl'
attack_data_path = '/anomaly_20/labels_df/houses_concatenated.pkl'
#Read Normal Data (No Attacks)
houses = pd.read_pickle(data_dir_path + normal_data_path)
......
{"backend": "tensorflow", "keras_version": "2.2.4", "config": {"name": "sequential_1", "layers": [{"config": {"kernel_regularizer": null, "name": "conv1d_1", "data_format": "channels_last", "use_bias": true, "filters": 8, "dilation_rate": [1], "padding": "same", "batch_input_shape": [null, 21, 1], "kernel_initializer": {"config": {"distribution": "uniform", "mode": "fan_avg", "seed": null, "scale": 1.0}, "class_name": "VarianceScaling"}, "bias_regularizer": null, "kernel_size": [5], "trainable": true, "dtype": "float32", "activity_regularizer": null, "activation": "tanh", "bias_initializer": {"config": {}, "class_name": "Zeros"}, "kernel_constraint": null, "strides": [1], "bias_constraint": null}, "class_name": "Conv1D"}, {"config": {"name": "global_max_pooling1d_1", "data_format": "channels_last", "trainable": true}, "class_name": "GlobalMaxPooling1D"}, {"config": {"name": "dense_1", "use_bias": true, "bias_initializer": {"config": {}, "class_name": "Zeros"}, "kernel_initializer": {"config": {"distribution": "uniform", "mode": "fan_avg", "seed": null, "scale": 1.0}, "class_name": "VarianceScaling"}, "bias_regularizer": null, "trainable": true, "units": 21, "activity_regularizer": null, "activation": "tanh", "kernel_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "class_name": "Dense"}]}, "class_name": "Sequential"}
\ No newline at end of file
{"class_name": "Sequential", "config": {"name": "sequential_1", "layers": [{"class_name": "Conv1D", "config": {"name": "conv1d_1", "trainable": true, "batch_input_shape": [null, 21, 1], "dtype": "float32", "filters": 8, "kernel_size": [5], "strides": [1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1], "activation": "tanh", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "GlobalMaxPooling1D", "config": {"name": "global_max_pooling1d_1", "trainable": true, "dtype": "float32", "data_format": "channels_last"}}, {"class_name": "Dense", "config": {"name": "dense_1", "trainable": true, "dtype": "float32", "units": 21, "activation": "tanh", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}]}, "keras_version": "2.3.1", "backend": "tensorflow"}
\ No newline at end of file
%% Cell type:markdown id: tags:
## Import Libraries
%% Cell type:code id: tags:
``` python
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import h5py
%matplotlib inline
```
%% Cell type:markdown id: tags:
## Configuration
%% Cell type:code id: tags:
``` python
# File generated by the simulator
#INPUT_HDF5_FILE = '../data/normal/demo.hdf5'
INPUT_HDF5_FILE = '../data/anomaly_10/demo_10.hdf5'
# Path to generate pikle files of the preprocessed data
#OUTPUT_PKL_PATH = '../data/normal/labels_df/'
OUTPUT_PKL_PATH = '../data/anomaly_10/labels_df/'
# output pkl file for every house - DO NOT MODIFY
OUTPUT_HOUSE = OUTPUT_PKL_PATH + "house_{0}.pkl"
# output pkl file with all the houses concatenated - DO NOT MODIFY
OUTPUT_CONCATENATED = OUTPUT_PKL_PATH + "houses_concatenated.pkl"
#
# Number of houses of the scenario
NUMBER_OF_HOUSES = 37
```
%% Cell type:markdown id: tags:
## Read data
%% Cell type:code id: tags:
``` python
filename = INPUT_HDF5_FILE
f = h5py.File(filename, 'r')
```
%% Cell type:code id: tags:
``` python
# get the names of the datasets and print them
datasetNames = [n for n in f.keys()]
for n in datasetNames:
print(n)
```
%% Output
Relations
Series
%% Cell type:code id: tags:
``` python
# extract series and relations from the datasets
series = f['Series']
relations = f['Relations']
```
%% Cell type:code id: tags:
``` python
list(series.keys())
```
%% Output
['CSV-0.PV_0',
'CSV-0.PV_1',
'CSV-0.PV_10',
'CSV-0.PV_11',
'CSV-0.PV_12',
'CSV-0.PV_13',
'CSV-0.PV_14',
'CSV-0.PV_15',
'CSV-0.PV_16',
'CSV-0.PV_17',
'CSV-0.PV_18',
'CSV-0.PV_19',
'CSV-0.PV_2',
'CSV-0.PV_3',
'CSV-0.PV_4',
'CSV-0.PV_5',
'CSV-0.PV_6',
'CSV-0.PV_7',
'CSV-0.PV_8',
'CSV-0.PV_9',
'HouseholdSim-0.House_0',
'HouseholdSim-0.House_1',
'HouseholdSim-0.House_10',
'HouseholdSim-0.House_11',
'HouseholdSim-0.House_12',
'HouseholdSim-0.House_13',
'HouseholdSim-0.House_14',
'HouseholdSim-0.House_15',
'HouseholdSim-0.House_16',
'HouseholdSim-0.House_17',
'HouseholdSim-0.House_18',
'HouseholdSim-0.House_19',
'HouseholdSim-0.House_2',
'HouseholdSim-0.House_20',
'HouseholdSim-0.House_21',
'HouseholdSim-0.House_22',
'HouseholdSim-0.House_23',
'HouseholdSim-0.House_24',
'HouseholdSim-0.House_25',
'HouseholdSim-0.House_26',
'HouseholdSim-0.House_27',
'HouseholdSim-0.House_28',
'HouseholdSim-0.House_29',
'HouseholdSim-0.House_3',
'HouseholdSim-0.House_30',
'HouseholdSim-0.House_31',
'HouseholdSim-0.House_32',
'HouseholdSim-0.House_33',
'HouseholdSim-0.House_34',
'HouseholdSim-0.House_35',
'HouseholdSim-0.House_36',
'HouseholdSim-0.House_4',
'HouseholdSim-0.House_5',
'HouseholdSim-0.House_6',
'HouseholdSim-0.House_7',
'HouseholdSim-0.House_8',
'HouseholdSim-0.House_9',
'PyPower-0.0-branch_1',
'PyPower-0.0-branch_10',
'PyPower-0.0-branch_11',
'PyPower-0.0-branch_12',
'PyPower-0.0-branch_13',
'PyPower-0.0-branch_14',
'PyPower-0.0-branch_15',
'PyPower-0.0-branch_16',
'PyPower-0.0-branch_17',
'PyPower-0.0-branch_18',
'PyPower-0.0-branch_19',
'PyPower-0.0-branch_2',
'PyPower-0.0-branch_20',
'PyPower-0.0-branch_21',
'PyPower-0.0-branch_22',
'PyPower-0.0-branch_23',
'PyPower-0.0-branch_24',
'PyPower-0.0-branch_25',
'PyPower-0.0-branch_26',
'PyPower-0.0-branch_27',
'PyPower-0.0-branch_28',
'PyPower-0.0-branch_29',
'PyPower-0.0-branch_3',
'PyPower-0.0-branch_30',
'PyPower-0.0-branch_31',
'PyPower-0.0-branch_32',
'PyPower-0.0-branch_33',
'PyPower-0.0-branch_34',
'PyPower-0.0-branch_35',
'PyPower-0.0-branch_36',
'PyPower-0.0-branch_37',
'PyPower-0.0-branch_4',
'PyPower-0.0-branch_5',
'PyPower-0.0-branch_6',
'PyPower-0.0-branch_7',
'PyPower-0.0-branch_8',
'PyPower-0.0-branch_9',
'PyPower-0.0-node_a1',
'PyPower-0.0-node_a2',
'PyPower-0.0-node_a3',
'PyPower-0.0-node_b1',
'PyPower-0.0-node_b10',
'PyPower-0.0-node_b2',
'PyPower-0.0-node_b3',
'PyPower-0.0-node_b4',
'PyPower-0.0-node_b5',
'PyPower-0.0-node_b6',
'PyPower-0.0-node_b7',
'PyPower-0.0-node_b8',
'PyPower-0.0-node_b9',
'PyPower-0.0-node_c1',
'PyPower-0.0-node_c10',
'PyPower-0.0-node_c11',
'PyPower-0.0-node_c12',
'PyPower-0.0-node_c2',
'PyPower-0.0-node_c3',
'PyPower-0.0-node_c4',
'PyPower-0.0-node_c5',
'PyPower-0.0-node_c6',
'PyPower-0.0-node_c7',
'PyPower-0.0-node_c8',
'PyPower-0.0-node_c9',
'PyPower-0.0-node_d1',
'PyPower-0.0-node_d10',
'PyPower-0.0-node_d11',
'PyPower-0.0-node_d12',
'PyPower-0.0-node_d2',
'PyPower-0.0-node_d3',
'PyPower-0.0-node_d4',
'PyPower-0.0-node_d5',
'PyPower-0.0-node_d6',
'PyPower-0.0-node_d7',
'PyPower-0.0-node_d8',
'PyPower-0.0-node_d9',
'PyPower-0.0-tr_pri',
'PyPower-0.0-tr_sec',
'PyPower-0.0-transformer']
%% Cell type:code id: tags:
``` python
p_house_0 = list(series['HouseholdSim-0.House_0']['P_out'])
```
%% Cell type:markdown id: tags:
## Clean Data
%% Cell type:code id: tags:
``` python
def divide_15(array):
a15 = []
for i in range(len(array)):
if i%15 == 0:
a15.append(array[i])
return a15
```
%% Cell type:code id: tags:
``` python
p_house_0_15 = divide_15(p_house_0)
```
%% Cell type:code id: tags:
``` python
days = pd.date_range('1/1/2011', periods=96, freq='15Min')
```
%% Cell type:markdown id: tags:
## DataFrame Creation
%% Cell type:code id: tags:
``` python
def create_df(array):
columns = ["Day","Hour","Minute","0","15", "30", "45", "60", "75", "90","105","mean","diff_mean-1","diff_mean+1","std","diff_values","Q1","Q2","Q3","IQR", "energy"]
df_good = pd.DataFrame(columns=columns)
previous_mean = 0
day = 0
for i in range(len(array)-7):
w_values = np.array(([array[i], array[i+1], array[i+2], array[i+3], array[i+4], array[i+5], array[i+6], array[i+7]]))
mean = np.mean(w_values)
std = np.std(w_values)
diff_mean = mean - previous_mean
diff_values = array[i+7]-array[i]
Q1 = np.percentile(w_values, 25)
Q2 = np.percentile(w_values, 50)
Q3 = np.percentile(w_values, 75)
IQR = Q3 - Q1
energy = np.sum(w_values ** 2)
if i%96 == 0:
day += 1
hour = days[i%96].hour
minute = days[i%96].minute
ar = [day, hour, minute, array[i], array[i+1], array[i+2],array[i+3],array[i+4],array[i+5],array[i+6], array[i+7], mean, diff_mean, mean, std, diff_values,Q1,Q2,Q3,IQR, energy]
previous_mean = mean
if len(df_good)-1 >= 0:
df_good.loc[len(df_good)-1,"diff_mean+1"]=diff_mean
df_good.loc[len(df_good)] = ar
return df_good
```
%% Cell type:code id: tags:
``` python
d={}
for x in range(0,38):
for x in range(0, NUMBER_OF_HOUSES):
print(x)
d["p_house_{0}".format(x)]= list(series['HouseholdSim-0.House_{0}'.format(x)]['P_out'])
```
%% Output
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
%% Cell type:code id: tags:
``` python
d_15={}
for x in range(0,38):
for x in range(0, NUMBER_OF_HOUSES):
d_15["p_house_{0}_15".format(x)] = divide_15(d["p_house_{0}".format(x)])
```
%% Cell type:code id: tags:
``` python
plt.plot(d_15["p_house_0_15"])
```
%% Output
[<matplotlib.lines.Line2D at 0x7f1bf7564d90>]
[<matplotlib.lines.Line2D at 0x7f610efc1910>]
%% Cell type:code id: tags:
``` python
d_df={}
for x in range(0,38):
for x in range(0, NUMBER_OF_HOUSES):
print(x)
d_df["df_house_{0}".format(x)] = create_df(d_15["p_house_{0}_15".format(x)])
```
%% Output
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
%% Cell type:code id: tags:
``` python
d_df["df_house_1"].iloc[1785:1787]
```
%% Output
Day Hour Minute 0 15 30 45 60 75 \
1785 19.0 14.0 15.0 72.83 72.28 1072.77 1150.66 1149.15 1212.51
1786 19.0 14.0 30.0 72.28 1072.77 1150.66 1149.15 1212.51 1289.51
90 ... mean diff_mean-1 diff_mean+1 std \
1785 1289.51 ... 936.84250 165.71250 19.23875 511.525576
1786 1475.03 ... 956.08125 19.23875 48.55875 480.629047
diff_values Q1 Q2 Q3 IQR energy
1785 1402.20 822.7850 1149.905 1231.76 408.9750 9.114658e+06
1786 154.46 861.2625 1149.905 1231.76 370.4975 9.160765e+06
[2 rows x 21 columns]
%% Cell type:markdown id: tags:
### Attack Labels
%% Cell type:code id: tags:
``` python
# Labels
for x in range(0,38):
for x in range(0, NUMBER_OF_HOUSES):
d_df["df_house_{0}".format(x)]['attacked'] = 0
d_df["df_house_{0}".format(x)].loc[1786:, 'attacked'] = 1
```
%% Cell type:code id: tags:
``` python
# Labels
for x in range(0,38):
for x in range(0, NUMBER_OF_HOUSES):
d_df["df_house_{0}".format(x)]['attacked'] = 0
d_df["df_house_{0}".format(x)].loc[1786:2381, 'attacked'] = 1
```
%% Cell type:code id: tags:
``` python
d_df["df_house_0"]['attacked'] = 0
d_df["df_house_1"]['attacked'] = 0
d_df["df_house_6"]['attacked'] = 0
d_df["df_house_8"]['attacked'] = 0
d_df["df_house_12"]['attacked'] = 0
d_df["df_house_19"]['attacked'] = 0
d_df["df_house_37"]['attacked'] = 0
```
%% Output
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-28-375f7190abd4> in <module>
5 d_df["df_house_12"]['attacked'] = 0
6 d_df["df_house_19"]['attacked'] = 0
----> 7 d_df["df_house_37"]['attacked'] = 0
KeyError: 'df_house_37'
%% Cell type:code id: tags:
``` python
d_df["df_house_0"].iloc[2381:2384]
```
%% Output
Day Hour Minute 0 15 30 45 60 75 \
2381 25.0 19.0 15.0 316.67 354.16 526.82 602.34 674.75 570.65
2382 25.0 19.0 30.0 354.16 526.82 602.34 674.75 570.65 462.30
2383 25.0 19.0 45.0 526.82 602.34 674.75 570.65 462.30 130.39
90 ... diff_mean-1 diff_mean+1 std diff_values \
2381 462.30 ... -66.33000 -14.05500 167.055585 -186.28
2382 130.39 ... -14.05500 -18.69875 182.132039 -149.93
2383 204.23 ... -18.69875 -35.37375 197.119631 -322.25
Q1 Q2 Q3 IQR energy attacked
2381 344.7875 494.56 578.5725 233.7850 1.877714e+06 0
2382 316.6775 494.56 578.5725 261.8950 1.819144e+06 0
2383 204.4850 494.56 578.5725 374.0875 1.735563e+06 0
[3 rows x 22 columns]
%% Cell type:markdown id: tags:
### Saving DataFrames into Files
%% Cell type:code id: tags:
``` python
for x in range(0,38):
for x in range(0, NUMBER_OF_HOUSES):
d_df["df_house_{0}".format(x)].to_pickle(OUTPUT_HOUSE.format(x))
```
%% Cell type:code id: tags:
``` python
d_read = {}
for x in range(0,38):
for x in range(0, NUMBER_OF_HOUSES):
d_read["df_house_{0}".format(x)]= pd.read_pickle(OUTPUT_HOUSE.format(x))
```
%% Cell type:code id: tags:
``` python
d_read['df_house_0']
```
%% Output
Day Hour Minute 0 15 30 45 60 75 \
0 1.0 0.0 0.0 136.76 330.67 230.49 268.72 471.48 137.80
1 1.0 0.0 15.0 330.67 230.49 268.72 471.48 137.80 62.75
2 1.0 0.0 30.0 230.49 268.72 471.48 137.80 62.75 62.41
3 1.0 0.0 45.0 268.72 471.48 137.80 62.75 62.41 63.91
4 1.0 1.0 0.0 471.48 137.80 62.75 62.41 63.91 252.14
... ... ... ... ... ... ... ... ... ...
2964 31.0 21.0 0.0 1320.63 1522.03 1478.86 1392.36 253.99 139.07
2965 31.0 21.0 15.0 1522.03 1478.86 1392.36 253.99 139.07 214.28
2966 31.0 21.0 30.0 1478.86 1392.36 253.99 139.07 214.28 339.37
2967 31.0 21.0 45.0 1392.36 253.99 139.07 214.28 339.37 425.82
2968 31.0 22.0 0.0 253.99 139.07 214.28 339.37 425.82 360.16
90 ... diff_mean-1 diff_mean+1 std diff_values \
0 62.75 ... 212.63500 -9.10625 132.659187 -74.35
1 62.41 ... -9.10625 -9.81625 139.859930 -266.76
2 63.91 ... -9.81625 2.38000 133.188628 21.65
3 252.14 ... 2.38000 -25.65625 133.992248 -19.19
4 249.53 ... -25.65625 -41.49375 137.240395 -408.01
... ... ... ... ... ... ...
2964 214.28 ... -148.56250 -111.85125 600.607931 -981.26
2965 339.37 ... -111.85125 -145.23375 582.344742 -1096.21
2966 425.82 ... -145.23375 -115.68375 504.005463 -1118.70
2967 360.16 ... -115.68375 -111.32000 372.410888 -838.97
2968 553.39 ... -111.32000 348.48500 133.457188 247.81
Q1 Q2 Q3 IQR energy attacked
0 118.2575 184.145 284.2075 165.9500 5.024968e+05 0
1 63.6200 184.145 284.2075 220.5875 4.878780e+05 0
2 63.6200 184.145 256.2850 192.6650 4.421099e+05 0
3 63.6200 193.665 256.2850 192.6650 4.512495e+05 0
4 63.2900 100.855 250.1825 186.8925 3.830675e+05 0
... ... ... ... ... ... ...
2964 244.0625 830.000 1413.9850 1169.9225 8.431271e+06 0
2965 244.0625 382.595 1413.9850 1169.9225 6.868531e+06 0
2966 244.0625 349.765 667.4550 423.3925 4.681670e+06 0
2967 244.0625 349.765 457.7125 213.6500 2.800884e+06 0
2968 244.0625 349.765 444.8150 200.7525 1.114021e+06 0
[2969 rows x 22 columns]
%% Cell type:code id: tags:
``` python
d_read['df_house_1']
```
%% Output
Day Hour Minute 0 15 30 45 60 75 \
0 1.0 0.0 0.0 41.34 319.30 345.85 442.71 322.18 115.81
1 1.0 0.0 15.0 319.30 345.85 442.71 322.18 115.81 116.02
2 1.0 0.0 30.0 345.85 442.71 322.18 115.81 116.02 117.21
3 1.0 0.0 45.0 442.71 322.18 115.81 116.02 117.21 192.82
4 1.0 1.0 0.0 322.18 115.81 116.02 117.21 192.82 191.96
... ... ... ... ... ... ... ... ... ...
2964 31.0 21.0 0.0 484.79 376.92 269.16 485.51 434.05 386.99
2965 31.0 21.0 15.0 376.92 269.16 485.51 434.05 386.99 119.39
2966 31.0 21.0 30.0 269.16 485.51 434.05 386.99 119.39 173.66
2967 31.0 21.0 45.0 485.51 434.05 386.99 119.39 173.66 268.75
2968 31.0 22.0 0.0 434.05 386.99 119.39 173.66 268.75 461.79
90 ... diff_mean-1 diff_mean+1 std diff_values \
0 116.02 ... 227.55250 18.93500 136.672722 75.87
1 117.21 ... 18.93500 -15.91750 118.900400 -126.48
2 192.82 ... -15.91750 -21.99750 116.588536 -153.89
3 191.96 ... -21.99750 -50.58500 109.125493 -272.84
4 169.87 ... -50.58500 -35.32625 78.310778 -284.15
... ... ... ... ... ... ...
2964 119.39 ... -26.15625 -27.00500 130.334293 -311.13
2965 173.66 ... -27.00500 10.60875 119.760160 -108.17
2966 268.75 ... 10.60875 -19.06500 128.292148 192.63
2967 461.79 ... -19.06500 -55.76000 145.358308 -368.87
2968 116.64 ... -55.76000 250.08750 151.186371 -394.62
Q1 Q2 Q3 IQR energy attacked
0 115.9675 218.255 328.0975 212.1300 5.636766e+05 0
1 116.9125 256.060 328.0975 211.1850 5.991471e+05 0
2 116.9125 192.390 328.0975 211.1850 5.340433e+05 0
3 116.9125 180.915 225.1600 108.2475 4.432869e+05 0
4 115.9675 143.540 192.1750 76.2075 2.487410e+05 0
... ... ... ... ... ... ...
2964 245.2850 381.955 446.7350 201.4500 1.067830e+06 0
2965 244.9775 323.040 398.7550 153.7775 9.050347e+05 0
2966 244.9775 328.075 440.9850 196.0075 9.762161e+05 0
2967 160.0925 327.870 440.9850 280.8925 9.173738e+05 0
2968 118.7025 221.205 398.7550 280.0525 6.832086e+05 0
[2969 rows x 22 columns]
%% Cell type:code id: tags:
``` python
result = pd.concat(d_read, ignore_index=True)
result.to_pickle(OUTPUT_CONCATENATED)
```
%% Cell type:code id: tags:
``` python
concatenated = pd.read_pickle(OUTPUT_CONCATENATED)
```
%% Cell type:code id: tags:
``` python
concatenated
```
%% Output
Day Hour Minute 0 15 30 45 60 75 \
0 1.0 0.0 0.0 136.76 330.67 230.49 268.72 471.48 137.80
1 1.0 0.0 15.0 330.67 230.49 268.72 471.48 137.80 62.75
2 1.0 0.0 30.0 230.49 268.72 471.48 137.80 62.75 62.41
3 1.0 0.0 45.0 268.72 471.48 137.80 62.75 62.41 63.91
4 1.0 1.0 0.0 471.48 137.80 62.75 62.41 63.91 252.14
... ... ... ... ... ... ... ... ... ...
112817 31.0 21.0 0.0 660.22 602.68 620.58 563.40 743.63 374.23
112818 31.0 21.0 15.0 602.68 620.58 563.40 743.63 374.23 603.75
112819 31.0 21.0 30.0 620.58 563.40 743.63 374.23 603.75 197.33
112820 31.0 21.0 45.0 563.40 743.63 374.23 603.75 197.33 50.89
112821 31.0 22.0 0.0 743.63 374.23 603.75 197.33 50.89 139.08
90 ... diff_mean-1 diff_mean+1 std diff_values \
0 62.75 ... 212.63500 -9.10625 132.659187 -74.35
1 62.41 ... -9.10625 -9.81625 139.859930 -266.76
2 63.91 ... -9.81625 2.38000 133.188628 21.65
3 252.14 ... 2.38000 -25.65625 133.992248 -19.19
4 249.53 ... -25.65625 -41.49375 137.240395 -408.01
... ... ... ... ... ... ...
112817 603.75 ... -16.43125 -76.16625 164.161336 -462.89
112818 197.33 ... -76.16625 -57.95000 223.868486 -551.79
112819 50.89 ... -57.95000 -59.99750 241.238582 -481.50
112820 139.08 ... -59.99750 -15.20125 241.492750 -422.80
112821 140.60 ... -15.20125 336.41250 231.295185 -301.84
Q1 Q2 Q3 IQR energy attacked
0 118.2575 184.145 284.2075 165.9500 5.024968e+05 0
1 63.6200 184.145 284.2075 220.5875 4.878780e+05 0
2 63.6200 184.145 256.2850 192.6650 4.421099e+05 0
3 63.6200 193.665 256.2850 192.6650 4.512495e+05 0
4 63.2900 100.855 250.1825 186.8925 3.830675e+05 0
... ... ... ... ... ... ...
112817 516.1075 603.215 630.4900 114.3825 2.598140e+06 0
112818 330.0050 583.040 607.9575 277.9525 2.164839e+06 0
112819 182.7675 468.815 607.9575 425.1900 1.820959e+06 0
112820 140.2200 285.780 573.4875 433.2675 1.455608e+06 0
112821 140.2200 285.780 482.2800 342.0600 1.333367e+06 0
[112822 rows x 22 columns]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment