Exemplo n.º 1
0
FEB = 2
MAR = 3
APR = 4
MAY = 5
JUN = 6
JUL = 7
AUG = 8
SEP = 9
OCT = 10
NOV = 11
DEC = 12 

#Read and scale 
data = bm.read_data(FILE_NAME)
#pd.concat([bm.read_data("preprocessed_471_2016.csv"), data])
data['Scaled'], sc = bm.scale_data(data)

#drop the speed column which includes real speed values (scaled values will be used instead)
data.drop(['Speed'], axis='columns', inplace=True)

#Nerging another sensor data to main one
#data_2 = bm.read_data(SECOND_FILE)
#data_2['Scaled_2'], sc = bm.scale_data(data_2, sc)
#data_2.drop(['Speed'], axis = 'columns', inplace = True)

#data_3 = bm.read_data(THIRD_FILE)
#data_3['Scaled_3'], sc = bm.scale_data(data_3, sc)
#data_3.drop(['Speed'], axis = 'columns', inplace = True)
#data_2 = bm.merge_two_data(data_2, data_3)

#data = bm.merge_two_data(data_2, data)
Exemplo n.º 2
0
FEB = 2
MAR = 3
APR = 4
MAY = 5
JUN = 6
JUL = 7
AUG = 8
SEP = 9
OCT = 10
NOV = 11
DEC = 12

#Read and scale data
data = bm.read_data(FILE_NAME)
#data = pd.concat([bm.read_data("preprocessed_471_2016.csv"), data])
data['Scaled'], sc = bm.scale_data(data)

#drop the speed column which includes real speed values (scaled values will be used instead)
data.drop(['Speed'], axis='columns', inplace=True)

#Nerging another sensor data to main one
data_2 = bm.read_data(SECOND_FILE)
data_2['Scaled_2'], sc = bm.scale_data(data_2, sc)
data_2.drop(['Speed'], axis='columns', inplace=True)
data = bm.merge_two_data(data_2, data)

#adding more prev data
data_prev = data.shift(7 * 24 * 12)
#data_prev_2 = data.shift(2*7*24*12)
#data_prev = bm.merge_two_data(data_prev_2, data_prev)
data = bm.merge_two_data(data_prev, data)