|
|
@ -35,8 +35,8 @@ class GeneralModel(Model): |
|
|
|
convolve_list = [] |
|
|
|
convolve_list = [] |
|
|
|
for segment in segments: |
|
|
|
for segment in segments: |
|
|
|
if segment['labeled']: |
|
|
|
if segment['labeled']: |
|
|
|
segment_from_index = utils.timestamp_to_index(dataframe, pd.to_datetime(segment['from'])) |
|
|
|
segment_from_index = utils.timestamp_to_index(dataframe, pd.to_datetime(segment['from'], unit='ms')) |
|
|
|
segment_to_index = utils.timestamp_to_index(dataframe, pd.to_datetime(segment['to'])) |
|
|
|
segment_to_index = utils.timestamp_to_index(dataframe, pd.to_datetime(segment['to'], unit='ms')) |
|
|
|
|
|
|
|
|
|
|
|
segment_data = data[segment_from_index: segment_to_index + 1] |
|
|
|
segment_data = data[segment_from_index: segment_to_index + 1] |
|
|
|
if len(segment_data) == 0: |
|
|
|
if len(segment_data) == 0: |
|
|
|