Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. threshold_value = 8
  2. cautelous_people_id = []
  3. uncautelous_people_id = []
  4.  
  5. minimum_row_count = 1e6
  6.  
  7. for person_id in range(1,40):
  8. with open(f"experiments/1/{person_id}.csv") as csvfile:
  9. reader = csv.reader(csvfile, quoting=csv.QUOTE_NONNUMERIC) # change contents to floats
  10. results_distance = []
  11. for row in reader: # each row is a list
  12. if len(row) == 2:
  13. continue
  14. results_distance.append(row[1])
  15. #use print below to decide threshold value
  16. #print(sum(results_distance)/len(results_distance) - 5)
  17. if(sum(results_distance)/len(results_distance) - 5 < threshold_value):
  18. uncautelous_people_id.append(person_id)
  19. else:
  20. cautelous_people_id.append(person_id)
  21. print(cautelous_people_id)
  22. print(uncautelous_people_id)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement