why are we sending empty list and How are comparing it’s length with frame_size if it is empty??
i have highlighted the problem in below given pics:
remember we have this code bellow
if not bound:
required_data_count=conf.FRAME_SIZE-len(history_data)
print("Not enough data to compute Z-score. Need ",required_data_count," more data points")
history_data.append(int(data['value']))
time.sleep(10)
continue
if not enough data it will con compute thew history_data will append to the current data value
3 Likes
Hi @iamkuldeep52s:
While the history_data variable is an empty list when it starts out, during the execution of the code, we append data points to this list.
Only once the list has enough data points to process the bounds, do we actually compute the bounds.
1 Like