I cannot understand the logic in the following code from the Instance_Creation.py please?
min_trip_time = 20 * 60 # 20 minutes equal to 1200 seconds
threshold = 200 # fixed of number of GPS points for each instance
i = 0
while i <= (len(Data) - 1):
No = 0
ModeType = Data[i, 3]
Counter = 0
# index: save the instance indices when an instance is being created and concatenate all in the remove
index = []
# First, we always have an instance with one GPS point.
while i <= (len(Data) - 1) and Data[i, 3] == ModeType and Counter < threshold:
if delta_time[i] <= min_trip_time:
Counter += 1
index.append(i)
i += 1
else:
Counter += 1
index.append(i)
i += 1
break
Why breaking user's trajectory into trips with min_trip?
I cannot understand the logic in the following code from the
Instance_Creation.py
please?Why breaking user's trajectory into trips with
min_trip
?