In [1]:
import emission.storage.decorations.location_queries as lq
In [2]:
reload(lq)
Out[2]:
<module 'emission.storage.decorations.location_queries' from '/Users/shankari/e-mission/e-mission-server/emission/storage/decorations/location_queries.pyc'>
In [3]:
import logging
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
logging.debug("test")
DEBUG:root:test
Note that we need to have separate unit tests for the analysis functions that will be run as part of the ongoing pipeline. This just tests the part that puts them all together and displays the map
In [4]:
ts = lq.get_section("20150120T083030-0800_0"); ts
Out[4]:
AttrDict({u'start_time': u'20150120T083030-0800', u'end_ts': 1421773972.0, u'start_ts': 1421771430.0, u'filter': u'time', u'source': u'raw_auto', u'end_time': u'20150120T091252-0800', u'_id': ObjectId('55c84b74f6858f75580c2dca'), u'id': u'20150120T083030-0800_0', u'prev_section': u'20150120T081412-0800_0'})
In [5]:
import emission.analysis.plotting.leaflet_osm.our_plotter as lo
In [6]:
reload(lo)
Out[6]:
<module 'emission.analysis.plotting.leaflet_osm.our_plotter' from '/Users/shankari/e-mission/e-mission-server/emission/analysis/plotting/leaflet_osm/our_plotter.pyc'>
In [7]:
import emission.analysis.classification.cleaning.speed_outlier_detection as cso
import emission.analysis.classification.cleaning.jump_smoothing as cjs
In [8]:
reload(cso)
reload(cjs)
Out[8]:
<module 'emission.analysis.classification.cleaning.jump_smoothing' from '/Users/shankari/e-mission/e-mission-server/emission/analysis/classification/cleaning/jump_smoothing.pyc'>
In [9]:
tml = lo.evaluate_filtering([ts], [cso.BoxplotOutlier(ignore_zeros=True)], [cjs.SmoothZigzag()])
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1421771430.0}}, {'data.mTime': {'$lt': 1421773972.0}}], 'user_id': u'20150120T083030-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 44, 45, 46, 47, 48, 49, 50, 51, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68], dtype='int64')
DEBUG:root:quartile values are 0.25 3581.627446
0.75 23463.043938
Name: speed, dtype: float64
DEBUG:root:iqr 19881.416492
DEBUG:root:For cluster 0 - 18, distance = 22908.9920464, is_cluster = False
DEBUG:root:For cluster 18 - 26, distance = 12.5405504797, is_cluster = True
DEBUG:root:shortest_non_cluster_segment = 0
DEBUG:root:Processing segment 1: Segment(18, 26, 12.5405504797), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.RIGHT, i = 2
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = [Segment(18, 26, 12.5405504797)]
DEBUG:root:after setting values, outlier_mask = [18 19 20 21 22 23 24 25]
DEBUG:root:quartile values are 0.25 13006.403225
0.75 27116.678769
Name: speed, dtype: float64
DEBUG:root:iqr 14110.2755441
filtered list size went from (78, 8) to (27, 8)
filtering points Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 44, 45, 46, 47, 48, 49, 50, 51, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68], dtype='int64')
filtered list size went from (78, 8) to (27, 8)
In [10]:
print tml
[[<folium.folium.Map object at 0x10b0a6610>, <folium.folium.Map object at 0x10b0cab10>, <folium.folium.Map object at 0x10b104690>]]
In [11]:
import emission.analysis.plotting.leaflet_osm.ipython_helper as ipy
In [12]:
ipy.inline_maps(tml, 1, 3)
Out[12]:
Order of results
In [13]:
import itertools
for (o, a) in itertools.product(["BoxplotOutlier", "SimpleQuartileOutlier"],
["SmoothPiecewiseRansac", "SmoothBoundary", "SmoothPosdap"]):
print o, a
BoxplotOutlier SmoothPiecewiseRansac
BoxplotOutlier SmoothBoundary
BoxplotOutlier SmoothPosdap
SimpleQuartileOutlier SmoothPiecewiseRansac
SimpleQuartileOutlier SmoothBoundary
SimpleQuartileOutlier SmoothPosdap
In [14]:
tml = lo.evaluate_filtering([ts], [cso.BoxplotOutlier(ignore_zeros=True)],
[cjs.SmoothPiecewiseRansac(), cjs.SmoothZigzag()])
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1421771430.0}}, {'data.mTime': {'$lt': 1421773972.0}}], 'user_id': u'20150120T083030-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 44, 45, 46, 47, 48, 49, 50, 51, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68], dtype='int64')
DEBUG:root:quartile values are 0.25 3581.627446
0.75 23463.043938
Name: speed, dtype: float64
DEBUG:root:iqr 19881.416492
DEBUG:root:Found 1 potential outliers, list = [18]
DEBUG:root:Only one candidate, cluster centers are [array([18])]
DEBUG:root:Considering candidate cluster center [18]
DEBUG:root:lowRange = max(13, 0) = 13 and highRange = max(23, 27) = 23
DEBUG:root:Area size = 11, index = Int64Index([13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23], dtype='int64') with size 11
DEBUG:root:In area 13 - 23, deleted 3 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:with speed df shape is (27, 10), ransac_mask size = 27
DEBUG:root:filtering done, ransac deleted points = [15 16 17]
filtered list size went from (78, 8) to (27, 8)
filtering points Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 44, 45, 46, 47, 48, 49, 50, 51, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68], dtype='int64')
filtered list size went from (78, 8) to (27, 8)
filtering points Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 44, 45, 46, 47, 48, 49, 50, 51, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68], dtype='int64')
DEBUG:root:quartile values are 0.25 3581.627446
0.75 23463.043938
Name: speed, dtype: float64
DEBUG:root:iqr 19881.416492
DEBUG:root:For cluster 0 - 18, distance = 22908.9920464, is_cluster = False
DEBUG:root:For cluster 18 - 26, distance = 12.5405504797, is_cluster = True
DEBUG:root:shortest_non_cluster_segment = 0
DEBUG:root:Processing segment 1: Segment(18, 26, 12.5405504797), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.RIGHT, i = 2
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = [Segment(18, 26, 12.5405504797)]
DEBUG:root:after setting values, outlier_mask = [18 19 20 21 22 23 24 25]
DEBUG:root:quartile values are 0.25 13006.403225
0.75 27116.678769
Name: speed, dtype: float64
DEBUG:root:iqr 14110.2755441
filtered list size went from (78, 8) to (27, 8)
Rearrange to two rows
In [15]:
def two_rows(map_list):
ret_list = [[map_list[0], map_list[2], map_list[3], map_list[4]], [map_list[1], map_list[5], map_list[6], map_list[7]]]
return ret_list
In [16]:
import emission.analysis.plotting.leaflet_osm.ipython_helper as ipy
In [17]:
ipy.inline_maps(tml, 1, 4)
Out[17]:
In [18]:
import json
In [19]:
section_ground_truth_list = json.load(open("/Users/shankari/cluster_ground_truth/smoothing/smoothing_removed_points_combined"))
In [20]:
section_ground_truth_list.keys()
Out[20]:
[u'b0d937d0-70ef-305e-9563-440369012b39_20150301T094814-0800_0',
u'6a488797-5be1-38aa-9700-5532be978ff9_20150305T011317-0500_0',
u'b0d937d0-70ef-305e-9563-440369012b39_20150227T193156-0800_2',
u'b0d937d0-70ef-305e-9563-440369012b39_20150302T081303-0800_0',
u'b0d937d0-70ef-305e-9563-440369012b39_20150227T074858-0800_0',
u'6a488797-5be1-38aa-9700-5532be978ff9_20150302T175642-0800_0',
u'6a488797-5be1-38aa-9700-5532be978ff9_20150304T141929-0800_0',
u'0763de67-f61e-3f5d-90e7-518e69793954_20150205T060912-0800_0',
u'6a488797-5be1-38aa-9700-5532be978ff9_20150304T143900-0800_1',
u'b0d937d0-70ef-305e-9563-440369012b39_20150302T075245-0800_0',
u'b0d937d0-70ef-305e-9563-440369012b39_20150217T163802-0800_1',
u'0763de67-f61e-3f5d-90e7-518e69793954_20150203T082402-0800_0',
u'b0d937d0-70ef-305e-9563-440369012b39_20150218T180624-0800_1',
u'0763de67-f61e-3f5d-90e7-518e69793954_20150120T083030-0800_0',
u'b0d937d0-70ef-305e-9563-440369012b39_20150217T101651-0800_0',
u'0763de67-f61e-3f5d-90e7-518e69793954_20150226T182413-0800_0',
u'0763de67-f61e-3f5d-90e7-518e69793954_20150409T065856-0700_0',
u'b0d937d0-70ef-305e-9563-440369012b39_20150224T083341-0800_0',
u'b0d937d0-70ef-305e-9563-440369012b39_20150225T083840-0800_0',
u'6a488797-5be1-38aa-9700-5532be978ff9_20150315T134346-0700_0',
u'b0d937d0-70ef-305e-9563-440369012b39_20150225T085712-0800_0',
u'6a488797-5be1-38aa-9700-5532be978ff9_20150302T152037-0800_0',
u'0763de67-f61e-3f5d-90e7-518e69793954_20150401T072115-0700_0',
u'0763de67-f61e-3f5d-90e7-518e69793954_20150219T060013-0800_0',
u'b0d937d0-70ef-305e-9563-440369012b39_20150218T075358-0800_0',
u'0763de67-f61e-3f5d-90e7-518e69793954_20150219T183212-0800_0',
u'b0d937d0-70ef-305e-9563-440369012b39_20150225T171446-0800_0',
u'0763de67-f61e-3f5d-90e7-518e69793954_20150119T075756-0800_0',
u'6a488797-5be1-38aa-9700-5532be978ff9_20150319T081326-0700_0',
u'0763de67-f61e-3f5d-90e7-518e69793954_20150226T055857-0800_0',
u'0763de67-f61e-3f5d-90e7-518e69793954_20150407T080139-0700_1',
u'0763de67-f61e-3f5d-90e7-518e69793954_20150402T065653-0700_0',
u'0763de67-f61e-3f5d-90e7-518e69793954_20150224T210728-0800_0',
u'0763de67-f61e-3f5d-90e7-518e69793954_20150326T224539-0700_0',
u'6a488797-5be1-38aa-9700-5532be978ff9_20150304T150408-0800_0',
u'0763de67-f61e-3f5d-90e7-518e69793954_20150402T191347-0700_0',
u'0763de67-f61e-3f5d-90e7-518e69793954_20150205T183338-0800_0',
u'0763de67-f61e-3f5d-90e7-518e69793954_20150331T084219-0700_4',
u'6a488797-5be1-38aa-9700-5532be978ff9_20150302T155301-0800_0']
In the raw data, we don't have user IDs. So we just extract the time part of the ID. The hope is that, given the small population using our data collection, this will be relatively unique.
In [21]:
section_ground_truth_list.keys()[0].split('_')
Out[21]:
[u'b0d937d0-70ef-305e-9563-440369012b39', u'20150301T094814-0800', u'0']
In [22]:
section_ground_truth_list.keys()[0].split('_')[1:]
Out[22]:
[u'20150301T094814-0800', u'0']
In [23]:
'_'.join(section_ground_truth_list.keys()[0].split('_')[1:])
Out[23]:
u'20150301T094814-0800_0'
In [24]:
extract_raw_section_id = lambda(uuid_key): '_'.join(uuid_key.split('_')[1:])
In [25]:
section_id_list = [extract_raw_section_id(key) for key in section_ground_truth_list.keys()]
In [26]:
section_id_list
Out[26]:
[u'20150301T094814-0800_0',
u'20150305T011317-0500_0',
u'20150227T193156-0800_2',
u'20150302T081303-0800_0',
u'20150227T074858-0800_0',
u'20150302T175642-0800_0',
u'20150304T141929-0800_0',
u'20150205T060912-0800_0',
u'20150304T143900-0800_1',
u'20150302T075245-0800_0',
u'20150217T163802-0800_1',
u'20150203T082402-0800_0',
u'20150218T180624-0800_1',
u'20150120T083030-0800_0',
u'20150217T101651-0800_0',
u'20150226T182413-0800_0',
u'20150409T065856-0700_0',
u'20150224T083341-0800_0',
u'20150225T083840-0800_0',
u'20150315T134346-0700_0',
u'20150225T085712-0800_0',
u'20150302T152037-0800_0',
u'20150401T072115-0700_0',
u'20150219T060013-0800_0',
u'20150218T075358-0800_0',
u'20150219T183212-0800_0',
u'20150225T171446-0800_0',
u'20150119T075756-0800_0',
u'20150319T081326-0700_0',
u'20150226T055857-0800_0',
u'20150407T080139-0700_1',
u'20150402T065653-0700_0',
u'20150224T210728-0800_0',
u'20150326T224539-0700_0',
u'20150304T150408-0800_0',
u'20150402T191347-0700_0',
u'20150205T183338-0800_0',
u'20150331T084219-0700_4',
u'20150302T155301-0800_0']
In [27]:
section_list = [lq.get_section(sid) for sid in section_id_list if lq.get_section(sid) is not None]
WARNING:root:Did not find match for section 20150227T193156-0800_2, returning None
WARNING:root:Did not find match for section 20150304T143900-0800_1, returning None
WARNING:root:Did not find match for section 20150217T163802-0800_1, returning None
WARNING:root:Did not find match for section 20150218T180624-0800_1, returning None
WARNING:root:Did not find match for section 20150119T075756-0800_0, returning None
WARNING:root:Did not find match for section 20150407T080139-0700_1, returning None
WARNING:root:Did not find match for section 20150331T084219-0700_4, returning None
In [28]:
len(section_list)
Out[28]:
32
In [34]:
[section.id for section in section_list[18:20]]
Out[34]:
[u'20150401T072115-0700_0', u'20150219T060013-0800_0']
In [35]:
map_list = lo.evaluate_filtering(section_list, [cso.BoxplotOutlier(ignore_zeros=True)],
[cjs.SmoothPiecewiseRansac(), cjs.SmoothZigzag()])
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1425232094.0}}, {'data.mTime': {'$lt': 1425232866.0}}], 'user_id': u'20150301T094814-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([0, 6, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 4395.965382
0.75 13840.943011
Name: speed, dtype: float64
DEBUG:root:iqr 9444.97762835
DEBUG:root:Found 0 potential outliers, list = []
INFO:root:No potential outliers ([]), so no areas to consider
DEBUG:root:with speed df shape is (13, 10), ransac_mask size = 13
DEBUG:root:filtering done, ransac deleted points = []
DEBUG:root:quartile values are 0.25 4395.965382
0.75 13840.943011
Name: speed, dtype: float64
DEBUG:root:iqr 9444.97762835
DEBUG:root:For cluster 0 - 12, distance = 8471.98907878, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 0
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = []
DEBUG:root:after setting values, outlier_mask = []
DEBUG:root:quartile values are 0.25 4395.965382
0.75 13840.943011
Name: speed, dtype: float64
DEBUG:root:iqr 9444.97762835
filtered list size went from (25, 8) to (13, 8)
filtering points Int64Index([0, 6, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21], dtype='int64')
filtered list size went from (25, 8) to (13, 8)
filtering points Int64Index([0, 6, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21], dtype='int64')
filtered list size went from (25, 8) to (13, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1425546797.0}}, {'data.mTime': {'$lt': 1425547936.0}}], 'user_id': u'20150305T011317-0500_0', 'metadata.filter': u'time'}
filtering points Int64Index([0, 1, 4, 5, 6, 7, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 22, 23], dtype='int64')
DEBUG:root:quartile values are 0.25 103.760518
0.75 4728.223739
Name: speed, dtype: float64
DEBUG:root:iqr 4624.46322139
DEBUG:root:Found 2 potential outliers, list = [2 4]
DEBUG:root:Found 2 clusters with centers [[2]
[4]]
DEBUG:root:Considering candidate cluster center [2]
DEBUG:root:lowRange = max(-3, 0) = 0 and highRange = max(7, 18) = 7
DEBUG:root:Considering candidate cluster center [4]
DEBUG:root:lowRange = max(-1, 0) = 0 and highRange = max(9, 18) = 9
DEBUG:root:Area size = 8, index = Int64Index([0, 1, 2, 3, 4, 5, 6, 7], dtype='int64') with size 8
DEBUG:root:In area 0 - 7, deleted 2 points through ransac filtering
DEBUG:root:Retain mask is of size 8
DEBUG:root:Area size = 10, index = Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype='int64') with size 10
DEBUG:root:In area 0 - 9, deleted 4 points through ransac filtering
DEBUG:root:Retain mask is of size 10
DEBUG:root:with speed df shape is (18, 10), ransac_mask size = 18
DEBUG:root:filtering done, ransac deleted points = [0 1 2 3]
filtered list size went from (36, 8) to (18, 8)
filtering points Int64Index([0, 1, 4, 5, 6, 7, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 22, 23], dtype='int64')
filtered list size went from (36, 8) to (18, 8)
filtering points Int64Index([0, 1, 4, 5, 6, 7, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 22, 23], dtype='int64')
DEBUG:root:quartile values are 0.25 103.760518
0.75 4728.223739
Name: speed, dtype: float64
DEBUG:root:iqr 4624.46322139
DEBUG:root:For cluster 0 - 2, distance = 0.0, is_cluster = True
DEBUG:root:For cluster 2 - 4, distance = 0.0, is_cluster = True
DEBUG:root:For cluster 4 - 17, distance = 674.296411849, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 2
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Processing segment 1: Segment(2, 4, 0.0), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = 0
DEBUG:root:Processing segment 0: Segment(0, 2, 0.0), expecting state Segment_State.GOOD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = -1
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = [Segment(2, 4, 0.0)]
DEBUG:root:after setting values, outlier_mask = [2 3]
DEBUG:root:quartile values are 0.25 98.780855
0.75 3877.057946
Name: speed, dtype: float64
DEBUG:root:iqr 3778.27709045
WARNING:root:After first round, still have outliers filter formatted_time idx key mAccuracy \
4 time 1970-01-17 03:59:07.431000 21 background/location 25
mLatitude mLongitude mTime distance speed
4 38.899456 -77.053946 1425547431 10570.78346 19907.313484
filtered list size went from (36, 8) to (18, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1425312783.0}}, {'data.mTime': {'$lt': 1425313388.0}}], 'user_id': u'20150302T081303-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
DEBUG:root:Found 3 potential outliers, list = [ 1 12 13]
DEBUG:root:Found 2 clusters with centers [[ 1]
[13]]
DEBUG:root:Considering candidate cluster center [1]
DEBUG:root:lowRange = max(-4, 0) = 0 and highRange = max(6, 17) = 6
DEBUG:root:Considering candidate cluster center [13]
DEBUG:root:lowRange = max(8, 0) = 8 and highRange = max(18, 17) = 17
DEBUG:root:Area size = 7, index = Int64Index([0, 1, 2, 3, 4, 5, 6], dtype='int64') with size 7
DEBUG:root:In area 0 - 6, deleted 2 points through ransac filtering
DEBUG:root:Retain mask is of size 7
DEBUG:root:Area size = 9, index = Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16], dtype='int64') with size 9
DEBUG:root:In area 8 - 16, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:with speed df shape is (17, 10), ransac_mask size = 17
DEBUG:root:filtering done, ransac deleted points = [ 0 6 12]
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
DEBUG:root:For cluster 0 - 1, distance = 0.0, is_cluster = True
DEBUG:root:For cluster 1 - 12, distance = 3627.92257946, is_cluster = False
DEBUG:root:For cluster 12 - 13, distance = 0.0, is_cluster = True
DEBUG:root:For cluster 13 - 16, distance = 798.474248054, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 3
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Processing segment 2: Segment(12, 13, 0.0), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = 1
DEBUG:root:Processing segment 1: Segment(1, 12, 3627.92257946), expecting state Segment_State.GOOD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = 0
DEBUG:root:Processing segment 0: Segment(0, 1, 0.0), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = -1
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = [Segment(0, 1, 0.0), Segment(12, 13, 0.0)]
DEBUG:root:after setting values, outlier_mask = [ 0 12]
DEBUG:root:quartile values are 0.25 2463.808076
0.75 14918.589474
Name: speed, dtype: float64
DEBUG:root:iqr 12454.7813976
filtered list size went from (23, 8) to (17, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1425052138.0}}, {'data.mTime': {'$lt': 1425052959.0}}], 'user_id': u'20150227T074858-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([25, 26], dtype='int64')
DEBUG:root:quartile values are 0.25 12455.257290
0.75 33986.918272
Name: speed, dtype: float64
DEBUG:root:iqr 21531.6609824
DEBUG:root:Found 0 potential outliers, list = []
INFO:root:No potential outliers ([]), so no areas to consider
DEBUG:root:with speed df shape is (25, 10), ransac_mask size = 25
DEBUG:root:filtering done, ransac deleted points = []
DEBUG:root:quartile values are 0.25 12455.257290
0.75 33986.918272
Name: speed, dtype: float64
DEBUG:root:iqr 21531.6609824
DEBUG:root:For cluster 0 - 24, distance = 16835.6900316, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 0
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = []
DEBUG:root:after setting values, outlier_mask = []
DEBUG:root:quartile values are 0.25 12455.257290
0.75 33986.918272
Name: speed, dtype: float64
DEBUG:root:iqr 21531.6609824
filtered list size went from (27, 8) to (25, 8)
filtering points Int64Index([25, 26], dtype='int64')
filtered list size went from (27, 8) to (25, 8)
filtering points Int64Index([25, 26], dtype='int64')
filtered list size went from (27, 8) to (25, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1425347802.0}}, {'data.mTime': {'$lt': 1425349189.0}}], 'user_id': u'20150302T175642-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([0, 1, 2, 8, 9, 10, 11, 14, 15, 16, 17, 19, 20, 21, 27, 39], dtype='int64')
DEBUG:root:quartile values are 0.25 599.479498
0.75 10924.073052
Name: speed, dtype: float64
DEBUG:root:iqr 10324.5935542
DEBUG:root:Found 1 potential outliers, list = [10]
DEBUG:root:Only one candidate, cluster centers are [array([10])]
DEBUG:root:Considering candidate cluster center [10]
DEBUG:root:lowRange = max(5, 0) = 5 and highRange = max(15, 33) = 15
DEBUG:root:Area size = 11, index = Int64Index([5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], dtype='int64') with size 11
DEBUG:root:In area 5 - 15, deleted 3 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:with speed df shape is (33, 10), ransac_mask size = 33
DEBUG:root:filtering done, ransac deleted points = [13 14 15]
filtered list size went from (49, 8) to (33, 8)
filtering points Int64Index([0, 1, 2, 8, 9, 10, 11, 14, 15, 16, 17, 19, 20, 21, 27, 39], dtype='int64')
filtered list size went from (49, 8) to (33, 8)
filtering points Int64Index([0, 1, 2, 8, 9, 10, 11, 14, 15, 16, 17, 19, 20, 21, 27, 39], dtype='int64')
DEBUG:root:quartile values are 0.25 599.479498
0.75 10924.073052
Name: speed, dtype: float64
DEBUG:root:iqr 10324.5935542
DEBUG:root:For cluster 0 - 10, distance = 3877.68775676, is_cluster = False
DEBUG:root:For cluster 10 - 32, distance = 2902.66563359, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 1
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Processing segment 0: Segment(0, 10, 3877.68775676), expecting state Segment_State.BAD
DEBUG:root:Recomputed_speed_df = 9 0.000000
8 -0.000000
7 -4678.609355
6 -16253.265848
5 -0.000000
4 -8015.698479
3 -0.000000
2 -27121.284287
1 -0.000000
0 -6076.564811
Name: speed, dtype: float64
DEBUG:root:new split point = 7
DEBUG:root:For cluster 0 - 8, distance = 3413.74181573, is_cluster = False
DEBUG:root:For cluster 8 - 10, distance = 0.0, is_cluster = True
DEBUG:root:Finishing process for Segment(8, 10, 0.0) after splitting mixed cluster
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = 0
DEBUG:root:Processing segment 0: Segment(0, 8, 3413.74181573), expecting state Segment_State.GOOD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = -1
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = [Segment(8, 10, 0.0)]
DEBUG:root:after setting values, outlier_mask = [8 9]
DEBUG:root:quartile values are 0.25 537.404437
0.75 10586.389416
Name: speed, dtype: float64
DEBUG:root:iqr 10048.9849792
filtered list size went from (49, 8) to (33, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1425507569.0}}, {'data.mTime': {'$lt': 1425508740.0}}], 'user_id': u'20150304T141929-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([0, 3, 4, 5, 19, 20, 21, 22, 23, 24, 25, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38], dtype='int64')
DEBUG:root:quartile values are 0.25 1290.438888
0.75 5580.082175
Name: speed, dtype: float64
DEBUG:root:iqr 4289.64328735
DEBUG:root:Found 2 potential outliers, list = [15 16]
DEBUG:root:Found 2 clusters with centers [[15]
[16]]
DEBUG:root:Considering candidate cluster center [15]
DEBUG:root:lowRange = max(10, 0) = 10 and highRange = max(20, 19) = 19
DEBUG:root:Considering candidate cluster center [16]
DEBUG:root:lowRange = max(11, 0) = 11 and highRange = max(21, 19) = 19
DEBUG:root:Area size = 9, index = Int64Index([10, 11, 12, 13, 14, 15, 16, 17, 18], dtype='int64') with size 9
DEBUG:root:In area 10 - 18, deleted 3 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:Area size = 8, index = Int64Index([11, 12, 13, 14, 15, 16, 17, 18], dtype='int64') with size 8
DEBUG:root:In area 11 - 18, deleted 2 points through ransac filtering
DEBUG:root:Retain mask is of size 8
DEBUG:root:with speed df shape is (19, 10), ransac_mask size = 19
DEBUG:root:filtering done, ransac deleted points = [10 11 15]
filtered list size went from (40, 8) to (19, 8)
filtering points Int64Index([0, 3, 4, 5, 19, 20, 21, 22, 23, 24, 25, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38], dtype='int64')
filtered list size went from (40, 8) to (19, 8)
filtering points Int64Index([0, 3, 4, 5, 19, 20, 21, 22, 23, 24, 25, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38], dtype='int64')
DEBUG:root:quartile values are 0.25 1290.438888
0.75 5580.082175
Name: speed, dtype: float64
DEBUG:root:iqr 4289.64328735
DEBUG:root:For cluster 0 - 15, distance = 882.407550978, is_cluster = False
DEBUG:root:For cluster 15 - 16, distance = 0.0, is_cluster = True
DEBUG:root:For cluster 16 - 18, distance = 0.0, is_cluster = True
DEBUG:root:shortest_non_cluster_segment = 0
DEBUG:root:Processing segment 1: Segment(15, 16, 0.0), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.RIGHT, i = 2
DEBUG:root:Processing segment 2: Segment(16, 18, 0.0), expecting state Segment_State.GOOD
DEBUG:root:At the end of the loop for direction IterationDirection.RIGHT, i = 3
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = [Segment(15, 16, 0.0)]
DEBUG:root:after setting values, outlier_mask = [15]
DEBUG:root:quartile values are 0.25 896.146806
0.75 4740.872957
Name: speed, dtype: float64
DEBUG:root:iqr 3844.72615117
filtered list size went from (40, 8) to (19, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1423145352.0}}, {'data.mTime': {'$lt': 1423146587.0}}], 'user_id': u'20150205T060912-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([0, 1, 2, 3, 8, 9, 11, 12, 13, 14, 15], dtype='int64')
DEBUG:root:quartile values are 0.25 399.686644
0.75 26915.218964
Name: speed, dtype: float64
DEBUG:root:iqr 26515.5323194
DEBUG:root:Found 0 potential outliers, list = []
INFO:root:No potential outliers ([]), so no areas to consider
DEBUG:root:with speed df shape is (27, 10), ransac_mask size = 27
DEBUG:root:filtering done, ransac deleted points = []
filtered list size went from (38, 8) to (27, 8)
filtering points Int64Index([0, 1, 2, 3, 8, 9, 11, 12, 13, 14, 15], dtype='int64')
filtered list size went from (38, 8) to (27, 8)
filtering points Int64Index([0, 1, 2, 3, 8, 9, 11, 12, 13, 14, 15], dtype='int64')
DEBUG:root:quartile values are 0.25 399.686644
0.75 26915.218964
Name: speed, dtype: float64
DEBUG:root:iqr 26515.5323194
DEBUG:root:For cluster 0 - 26, distance = 16650.1311454, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 0
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = []
DEBUG:root:after setting values, outlier_mask = []
DEBUG:root:quartile values are 0.25 399.686644
0.75 26915.218964
Name: speed, dtype: float64
DEBUG:root:iqr 26515.5323194
filtered list size went from (38, 8) to (27, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1425311565.0}}, {'data.mTime': {'$lt': 1425312379.0}}], 'user_id': u'20150302T075245-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([11, 15, 26], dtype='int64')
DEBUG:root:quartile values are 0.25 10565.233435
0.75 33836.053409
Name: speed, dtype: float64
DEBUG:root:iqr 23270.8199737
DEBUG:root:Found 0 potential outliers, list = []
INFO:root:No potential outliers ([]), so no areas to consider
DEBUG:root:with speed df shape is (24, 10), ransac_mask size = 24
DEBUG:root:filtering done, ransac deleted points = []
DEBUG:root:quartile values are 0.25 10565.233435
0.75 33836.053409
Name: speed, dtype: float64
DEBUG:root:iqr 23270.8199737
DEBUG:root:For cluster 0 - 23, distance = 16820.5300281, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 0
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = []
DEBUG:root:after setting values, outlier_mask = []
DEBUG:root:quartile values are 0.25 10565.233435
0.75 33836.053409
Name: speed, dtype: float64
DEBUG:root:iqr 23270.8199737
filtered list size went from (27, 8) to (24, 8)
filtering points Int64Index([11, 15, 26], dtype='int64')
filtered list size went from (27, 8) to (24, 8)
filtering points Int64Index([11, 15, 26], dtype='int64')
filtered list size went from (27, 8) to (24, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1422980642.0}}, {'data.mTime': {'$lt': 1422983363.0}}], 'user_id': u'20150203T082402-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 23, 24, 34, 40, 42, 44, 46, 47, 48, 62, 63, 67], dtype='int64')
DEBUG:root:quartile values are 0.25 287.352567
0.75 33557.577320
Name: speed, dtype: float64
DEBUG:root:iqr 33270.2247527
DEBUG:root:Found 2 potential outliers, list = [23 24]
DEBUG:root:Found 2 clusters with centers [[23]
[24]]
DEBUG:root:Considering candidate cluster center [23]
DEBUG:root:lowRange = max(18, 0) = 18 and highRange = max(28, 54) = 28
DEBUG:root:Considering candidate cluster center [24]
DEBUG:root:lowRange = max(19, 0) = 19 and highRange = max(29, 54) = 29
DEBUG:root:Area size = 11, index = Int64Index([18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28], dtype='int64') with size 11
DEBUG:root:In area 18 - 28, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:Area size = 11, index = Int64Index([19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], dtype='int64') with size 11
DEBUG:root:In area 19 - 29, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:with speed df shape is (54, 10), ransac_mask size = 54
DEBUG:root:filtering done, ransac deleted points = [23]
filtered list size went from (82, 8) to (54, 8)
filtering points Int64Index([1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 23, 24, 34, 40, 42, 44, 46, 47, 48, 62, 63, 67], dtype='int64')
filtered list size went from (82, 8) to (54, 8)
filtering points Int64Index([1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 23, 24, 34, 40, 42, 44, 46, 47, 48, 62, 63, 67], dtype='int64')
DEBUG:root:quartile values are 0.25 287.352567
0.75 33557.577320
Name: speed, dtype: float64
DEBUG:root:iqr 33270.2247527
DEBUG:root:For cluster 0 - 23, distance = 7509.54691561, is_cluster = False
DEBUG:root:For cluster 23 - 24, distance = 0.0, is_cluster = True
DEBUG:root:For cluster 24 - 53, distance = 16822.9475363, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 0
DEBUG:root:Processing segment 1: Segment(23, 24, 0.0), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.RIGHT, i = 2
DEBUG:root:Processing segment 2: Segment(24, 53, 16822.9475363), expecting state Segment_State.GOOD
DEBUG:root:At the end of the loop for direction IterationDirection.RIGHT, i = 3
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = [Segment(23, 24, 0.0)]
DEBUG:root:after setting values, outlier_mask = [23]
DEBUG:root:quartile values are 0.25 283.611255
0.75 31915.706415
Name: speed, dtype: float64
DEBUG:root:iqr 31632.0951604
filtered list size went from (82, 8) to (54, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1421771430.0}}, {'data.mTime': {'$lt': 1421773972.0}}], 'user_id': u'20150120T083030-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 44, 45, 46, 47, 48, 49, 50, 51, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68], dtype='int64')
DEBUG:root:quartile values are 0.25 3581.627446
0.75 23463.043938
Name: speed, dtype: float64
DEBUG:root:iqr 19881.416492
DEBUG:root:Found 1 potential outliers, list = [18]
DEBUG:root:Only one candidate, cluster centers are [array([18])]
DEBUG:root:Considering candidate cluster center [18]
DEBUG:root:lowRange = max(13, 0) = 13 and highRange = max(23, 27) = 23
DEBUG:root:Area size = 11, index = Int64Index([13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23], dtype='int64') with size 11
DEBUG:root:In area 13 - 23, deleted 3 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:with speed df shape is (27, 10), ransac_mask size = 27
DEBUG:root:filtering done, ransac deleted points = [13 14 17]
filtered list size went from (78, 8) to (27, 8)
filtering points Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 44, 45, 46, 47, 48, 49, 50, 51, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68], dtype='int64')
filtered list size went from (78, 8) to (27, 8)
filtering points Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 44, 45, 46, 47, 48, 49, 50, 51, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68], dtype='int64')
DEBUG:root:quartile values are 0.25 3581.627446
0.75 23463.043938
Name: speed, dtype: float64
DEBUG:root:iqr 19881.416492
DEBUG:root:For cluster 0 - 18, distance = 22908.9920464, is_cluster = False
DEBUG:root:For cluster 18 - 26, distance = 12.5405504797, is_cluster = True
DEBUG:root:shortest_non_cluster_segment = 0
DEBUG:root:Processing segment 1: Segment(18, 26, 12.5405504797), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.RIGHT, i = 2
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = [Segment(18, 26, 12.5405504797)]
DEBUG:root:after setting values, outlier_mask = [18 19 20 21 22 23 24 25]
DEBUG:root:quartile values are 0.25 13006.403225
0.75 27116.678769
Name: speed, dtype: float64
DEBUG:root:iqr 14110.2755441
filtered list size went from (78, 8) to (27, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1424197011.0}}, {'data.mTime': {'$lt': 1424198334.0}}], 'user_id': u'20150217T101651-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([11, 15, 16, 17, 21, 22, 23, 26, 27, 28, 29, 30, 31, 32], dtype='int64')
DEBUG:root:quartile values are 0.25 2105.550397
0.75 21471.660786
Name: speed, dtype: float64
DEBUG:root:iqr 19366.1103893
DEBUG:root:Found 0 potential outliers, list = []
INFO:root:No potential outliers ([]), so no areas to consider
DEBUG:root:with speed df shape is (31, 10), ransac_mask size = 31
DEBUG:root:filtering done, ransac deleted points = []
filtered list size went from (45, 8) to (31, 8)
filtering points Int64Index([11, 15, 16, 17, 21, 22, 23, 26, 27, 28, 29, 30, 31, 32], dtype='int64')
filtered list size went from (45, 8) to (31, 8)
filtering points Int64Index([11, 15, 16, 17, 21, 22, 23, 26, 27, 28, 29, 30, 31, 32], dtype='int64')
DEBUG:root:quartile values are 0.25 2105.550397
0.75 21471.660786
Name: speed, dtype: float64
DEBUG:root:iqr 19366.1103893
DEBUG:root:For cluster 0 - 30, distance = 17630.3401917, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 0
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = []
DEBUG:root:after setting values, outlier_mask = []
DEBUG:root:quartile values are 0.25 2105.550397
0.75 21471.660786
Name: speed, dtype: float64
DEBUG:root:iqr 19366.1103893
filtered list size went from (45, 8) to (31, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1425003853.0}}, {'data.mTime': {'$lt': 1425007427.0}}], 'user_id': u'20150226T182413-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 32, 33, 34, 35, 36, 37, 38, 42, 49, 52, 53, 58, 60, 61, 67, 76, 85, 96], dtype='int64')
DEBUG:root:quartile values are 0.25 1346.330009
0.75 16551.667383
Name: speed, dtype: float64
DEBUG:root:iqr 15205.3373743
DEBUG:root:Found 0 potential outliers, list = []
INFO:root:No potential outliers ([]), so no areas to consider
DEBUG:root:with speed df shape is (86, 10), ransac_mask size = 86
DEBUG:root:filtering done, ransac deleted points = []
filtered list size went from (112, 8) to (86, 8)
filtering points Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 32, 33, 34, 35, 36, 37, 38, 42, 49, 52, 53, 58, 60, 61, 67, 76, 85, 96], dtype='int64')
filtered list size went from (112, 8) to (86, 8)
filtering points Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 32, 33, 34, 35, 36, 37, 38, 42, 49, 52, 53, 58, 60, 61, 67, 76, 85, 96], dtype='int64')
DEBUG:root:quartile values are 0.25 1346.330009
0.75 16551.667383
Name: speed, dtype: float64
DEBUG:root:iqr 15205.3373743
DEBUG:root:For cluster 0 - 85, distance = 35556.3814523, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 0
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = []
DEBUG:root:after setting values, outlier_mask = []
DEBUG:root:quartile values are 0.25 1346.330009
0.75 16551.667383
Name: speed, dtype: float64
DEBUG:root:iqr 15205.3373743
filtered list size went from (112, 8) to (86, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1428591536.0}}, {'data.mTime': {'$lt': 1428593494.0}}], 'user_id': u'20150409T065856-0700_0', 'metadata.filter': u'time'}
filtering points Int64Index([1, 2, 3, 6, 7, 8, 9, 10, 11, 15, 22, 25, 30, 31, 32, 33, 34, 36, 39, 41, 46, 47], dtype='int64')
DEBUG:root:quartile values are 0.25 2519.376592
0.75 29717.948299
Name: speed, dtype: float64
DEBUG:root:iqr 27198.5717071
DEBUG:root:Found 0 potential outliers, list = []
INFO:root:No potential outliers ([]), so no areas to consider
DEBUG:root:with speed df shape is (35, 10), ransac_mask size = 35
DEBUG:root:filtering done, ransac deleted points = []
filtered list size went from (57, 8) to (35, 8)
filtering points Int64Index([1, 2, 3, 6, 7, 8, 9, 10, 11, 15, 22, 25, 30, 31, 32, 33, 34, 36, 39, 41, 46, 47], dtype='int64')
filtered list size went from (57, 8) to (35, 8)
filtering points Int64Index([1, 2, 3, 6, 7, 8, 9, 10, 11, 15, 22, 25, 30, 31, 32, 33, 34, 36, 39, 41, 46, 47], dtype='int64')
DEBUG:root:quartile values are 0.25 2519.376592
0.75 29717.948299
Name: speed, dtype: float64
DEBUG:root:iqr 27198.5717071
DEBUG:root:For cluster 0 - 34, distance = 26189.3973107, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 0
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = []
DEBUG:root:after setting values, outlier_mask = []
DEBUG:root:quartile values are 0.25 2519.376592
0.75 29717.948299
Name: speed, dtype: float64
DEBUG:root:iqr 27198.5717071
filtered list size went from (57, 8) to (35, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1424795621.0}}, {'data.mTime': {'$lt': 1424797437.0}}], 'user_id': u'20150224T083341-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([14, 16, 17, 19, 20, 22, 23, 24, 25, 26, 28, 31, 32, 33, 34, 35, 36, 38, 39, 41, 42, 43, 46, 47, 48], dtype='int64')
DEBUG:root:quartile values are 0.25 474.419644
0.75 8998.791241
Name: speed, dtype: float64
DEBUG:root:iqr 8524.37159727
DEBUG:root:Found 2 potential outliers, list = [20 21]
DEBUG:root:Found 2 clusters with centers [[20]
[21]]
DEBUG:root:Considering candidate cluster center [20]
DEBUG:root:lowRange = max(15, 0) = 15 and highRange = max(25, 36) = 25
DEBUG:root:Considering candidate cluster center [21]
DEBUG:root:lowRange = max(16, 0) = 16 and highRange = max(26, 36) = 26
DEBUG:root:Area size = 11, index = Int64Index([15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], dtype='int64') with size 11
DEBUG:root:In area 15 - 25, deleted 0 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:Area size = 11, index = Int64Index([16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26], dtype='int64') with size 11
DEBUG:root:In area 16 - 26, deleted 3 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:with speed df shape is (36, 10), ransac_mask size = 36
DEBUG:root:filtering done, ransac deleted points = [20 22 23]
filtered list size went from (61, 8) to (36, 8)
filtering points Int64Index([14, 16, 17, 19, 20, 22, 23, 24, 25, 26, 28, 31, 32, 33, 34, 35, 36, 38, 39, 41, 42, 43, 46, 47, 48], dtype='int64')
filtered list size went from (61, 8) to (36, 8)
filtering points Int64Index([14, 16, 17, 19, 20, 22, 23, 24, 25, 26, 28, 31, 32, 33, 34, 35, 36, 38, 39, 41, 42, 43, 46, 47, 48], dtype='int64')
DEBUG:root:quartile values are 0.25 474.419644
0.75 8998.791241
Name: speed, dtype: float64
DEBUG:root:iqr 8524.37159727
DEBUG:root:For cluster 0 - 20, distance = 7820.07434349, is_cluster = False
DEBUG:root:For cluster 20 - 21, distance = 0.0, is_cluster = True
DEBUG:root:For cluster 21 - 35, distance = 2276.74760406, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 2
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Processing segment 1: Segment(20, 21, 0.0), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = 0
DEBUG:root:Processing segment 0: Segment(0, 20, 7820.07434349), expecting state Segment_State.GOOD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = -1
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = [Segment(20, 21, 0.0)]
DEBUG:root:after setting values, outlier_mask = [20]
DEBUG:root:quartile values are 0.25 366.561491
0.75 8698.334384
Name: speed, dtype: float64
DEBUG:root:iqr 8331.7728933
filtered list size went from (61, 8) to (36, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1424882320.0}}, {'data.mTime': {'$lt': 1424883250.0}}], 'user_id': u'20150225T083840-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([5, 9, 10, 35, 41, 44, 46, 49], dtype='int64')
DEBUG:root:quartile values are 0.25 21642.914462
0.75 34264.492077
Name: speed, dtype: float64
DEBUG:root:iqr 12621.5776151
DEBUG:root:Found 0 potential outliers, list = []
INFO:root:No potential outliers ([]), so no areas to consider
DEBUG:root:with speed df shape is (43, 10), ransac_mask size = 43
DEBUG:root:filtering done, ransac deleted points = []
filtered list size went from (51, 8) to (43, 8)
filtering points Int64Index([5, 9, 10, 35, 41, 44, 46, 49], dtype='int64')
filtered list size went from (51, 8) to (43, 8)
filtering points Int64Index([5, 9, 10, 35, 41, 44, 46, 49], dtype='int64')
DEBUG:root:quartile values are 0.25 21642.914462
0.75 34264.492077
Name: speed, dtype: float64
DEBUG:root:iqr 12621.5776151
DEBUG:root:For cluster 0 - 42, distance = 16887.6130728, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 0
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = []
DEBUG:root:after setting values, outlier_mask = []
DEBUG:root:quartile values are 0.25 21642.914462
0.75 34264.492077
Name: speed, dtype: float64
DEBUG:root:iqr 12621.5776151
filtered list size went from (51, 8) to (43, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1426455826.0}}, {'data.mTime': {'$lt': 1426457803.0}}], 'user_id': u'20150315T134346-0700_0', 'metadata.filter': u'time'}
filtering points Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 25, 27], dtype='int64')
DEBUG:root:quartile values are 0.25 195.690497
0.75 1902.855139
Name: speed, dtype: float64
DEBUG:root:iqr 1707.16464184
DEBUG:root:Found 0 potential outliers, list = []
INFO:root:No potential outliers ([]), so no areas to consider
DEBUG:root:with speed df shape is (44, 10), ransac_mask size = 44
DEBUG:root:filtering done, ransac deleted points = []
filtered list size went from (65, 8) to (44, 8)
filtering points Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 25, 27], dtype='int64')
filtered list size went from (65, 8) to (44, 8)
filtering points Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 25, 27], dtype='int64')
DEBUG:root:quartile values are 0.25 195.690497
0.75 1902.855139
Name: speed, dtype: float64
DEBUG:root:iqr 1707.16464184
DEBUG:root:For cluster 0 - 43, distance = 1284.68033608, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 0
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = []
DEBUG:root:after setting values, outlier_mask = []
DEBUG:root:quartile values are 0.25 195.690497
0.75 1902.855139
Name: speed, dtype: float64
DEBUG:root:iqr 1707.16464184
filtered list size went from (65, 8) to (44, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1424883432.0}}, {'data.mTime': {'$lt': 1424884602.0}}], 'user_id': u'20150225T085712-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([13, 22, 23, 27, 28, 29, 30, 31, 32, 33], dtype='int64')
DEBUG:root:quartile values are 0.25 74.010904
0.75 4580.855771
Name: speed, dtype: float64
DEBUG:root:iqr 4506.84486666
DEBUG:root:Found 0 potential outliers, list = []
INFO:root:No potential outliers ([]), so no areas to consider
DEBUG:root:with speed df shape is (34, 10), ransac_mask size = 34
DEBUG:root:filtering done, ransac deleted points = []
filtered list size went from (44, 8) to (34, 8)
filtering points Int64Index([13, 22, 23, 27, 28, 29, 30, 31, 32, 33], dtype='int64')
filtered list size went from (44, 8) to (34, 8)
filtering points Int64Index([13, 22, 23, 27, 28, 29, 30, 31, 32, 33], dtype='int64')
DEBUG:root:quartile values are 0.25 74.010904
0.75 4580.855771
Name: speed, dtype: float64
DEBUG:root:iqr 4506.84486666
DEBUG:root:For cluster 0 - 33, distance = 2363.12795008, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 0
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = []
DEBUG:root:after setting values, outlier_mask = []
DEBUG:root:quartile values are 0.25 74.010904
0.75 4580.855771
Name: speed, dtype: float64
DEBUG:root:iqr 4506.84486666
filtered list size went from (44, 8) to (34, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1425338437.0}}, {'data.mTime': {'$lt': 1425340067.0}}], 'user_id': u'20150302T152037-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([14, 15, 18, 22, 31, 32, 33, 35, 36, 38, 39, 40, 41, 42, 43, 44, 45, 49, 50, 51], dtype='int64')
DEBUG:root:quartile values are 0.25 294.581436
0.75 4701.511937
Name: speed, dtype: float64
DEBUG:root:iqr 4406.93050047
DEBUG:root:Found 2 potential outliers, list = [31 33]
DEBUG:root:Found 2 clusters with centers [[31]
[33]]
DEBUG:root:Considering candidate cluster center [31]
DEBUG:root:lowRange = max(26, 0) = 26 and highRange = max(36, 34) = 34
DEBUG:root:Considering candidate cluster center [33]
DEBUG:root:lowRange = max(28, 0) = 28 and highRange = max(38, 34) = 34
DEBUG:root:Area size = 8, index = Int64Index([26, 27, 28, 29, 30, 31, 32, 33], dtype='int64') with size 8
DEBUG:root:In area 26 - 33, deleted 3 points through ransac filtering
DEBUG:root:Retain mask is of size 8
DEBUG:root:Area size = 6, index = Int64Index([28, 29, 30, 31, 32, 33], dtype='int64') with size 6
DEBUG:root:In area 28 - 33, deleted 2 points through ransac filtering
DEBUG:root:Retain mask is of size 6
DEBUG:root:with speed df shape is (34, 10), ransac_mask size = 34
DEBUG:root:filtering done, ransac deleted points = [29 30]
filtered list size went from (54, 8) to (34, 8)
filtering points Int64Index([14, 15, 18, 22, 31, 32, 33, 35, 36, 38, 39, 40, 41, 42, 43, 44, 45, 49, 50, 51], dtype='int64')
filtered list size went from (54, 8) to (34, 8)
filtering points Int64Index([14, 15, 18, 22, 31, 32, 33, 35, 36, 38, 39, 40, 41, 42, 43, 44, 45, 49, 50, 51], dtype='int64')
DEBUG:root:quartile values are 0.25 294.581436
0.75 4701.511937
Name: speed, dtype: float64
DEBUG:root:iqr 4406.93050047
DEBUG:root:For cluster 0 - 31, distance = 3353.2718755, is_cluster = False
DEBUG:root:For cluster 31 - 33, distance = 931.101358626, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 1
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Processing segment 0: Segment(0, 31, 3353.2718755), expecting state Segment_State.BAD
DEBUG:root:Recomputed_speed_df = 30 0.000000
29 -0.000000
28 -9429.066990
27 -46.846511
26 -209.897532
25 -150.383645
24 -1538.435684
23 -287.799488
22 -690.516227
21 -197.005221
20 -3145.155472
19 -0.000000
18 -1080.067548
17 -253.688564
16 -128.441222
15 -2980.561180
14 -8875.288909
13 -488.810751
12 -2700.959388
11 -0.000000
10 -322.526996
9 -3571.743084
8 -0.000000
7 -5473.196124
6 -2709.924109
5 -301.363385
4 -0.000000
3 -5863.557313
2 -0.000000
1 -1662.678193
0 -3929.827749
Name: speed, dtype: float64
DEBUG:root:new split point = 28
DEBUG:root:For cluster 0 - 29, distance = 946.804185803, is_cluster = False
DEBUG:root:For cluster 29 - 31, distance = 0.0, is_cluster = True
DEBUG:root:Finishing process for Segment(29, 31, 0.0) after splitting mixed cluster
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = 0
DEBUG:root:Processing segment 0: Segment(0, 29, 946.804185803), expecting state Segment_State.GOOD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = -1
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = [Segment(29, 31, 0.0)]
DEBUG:root:after setting values, outlier_mask = [29 30]
DEBUG:root:quartile values are 0.25 291.190462
0.75 3840.306583
Name: speed, dtype: float64
DEBUG:root:iqr 3549.11612106
WARNING:root:After first round, still have outliers filter formatted_time idx key mAccuracy \
33 time 1970-01-17 03:55:40.054000 54 background/location 13
mLatitude mLongitude mTime distance speed
33 37.825799 -122.267922 1425340054 130.4177 21736.283363
filtered list size went from (54, 8) to (34, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1427901675.0}}, {'data.mTime': {'$lt': 1427904290.0}}], 'user_id': u'20150401T072115-0700_0', 'metadata.filter': u'time'}
filtering points Int64Index([2, 4, 7, 10, 14, 21, 22, 23, 26, 38, 48, 49, 52, 54], dtype='int64')
DEBUG:root:quartile values are 0.25 508.786242
0.75 34515.555837
Name: speed, dtype: float64
DEBUG:root:iqr 34006.7695946
DEBUG:root:Found 11 potential outliers, list = [ 1 3 4 5 7 18 20 23 29 40 41]
DEBUG:root:Found 3 clusters with centers [[ 4]
[23]
[41]]
DEBUG:root:Considering candidate cluster center [4]
DEBUG:root:lowRange = max(-1, 0) = 0 and highRange = max(9, 64) = 9
DEBUG:root:Considering candidate cluster center [23]
DEBUG:root:lowRange = max(18, 0) = 18 and highRange = max(28, 64) = 28
DEBUG:root:Considering candidate cluster center [41]
DEBUG:root:lowRange = max(36, 0) = 36 and highRange = max(46, 64) = 46
DEBUG:root:Area size = 10, index = Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype='int64') with size 10
DEBUG:root:In area 0 - 9, deleted 0 points through ransac filtering
DEBUG:root:Retain mask is of size 10
DEBUG:root:Area size = 11, index = Int64Index([18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28], dtype='int64') with size 11
DEBUG:root:In area 18 - 28, deleted 5 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:Area size = 11, index = Int64Index([36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46], dtype='int64') with size 11
DEBUG:root:In area 36 - 46, deleted 4 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:with speed df shape is (64, 10), ransac_mask size = 64
DEBUG:root:filtering done, ransac deleted points = [20 21 22 24 26 40 44 45 46]
filtered list size went from (78, 8) to (64, 8)
filtering points Int64Index([2, 4, 7, 10, 14, 21, 22, 23, 26, 38, 48, 49, 52, 54], dtype='int64')
filtered list size went from (78, 8) to (64, 8)
filtering points Int64Index([2, 4, 7, 10, 14, 21, 22, 23, 26, 38, 48, 49, 52, 54], dtype='int64')
DEBUG:root:quartile values are 0.25 508.786242
0.75 34515.555837
Name: speed, dtype: float64
DEBUG:root:iqr 34006.7695946
DEBUG:root:For cluster 0 - 1, distance = 0.0, is_cluster = True
DEBUG:root:For cluster 1 - 3, distance = 1748.77650602, is_cluster = False
DEBUG:root:For cluster 3 - 4, distance = 0.0, is_cluster = True
DEBUG:root:For cluster 4 - 5, distance = 0.0, is_cluster = True
DEBUG:root:For cluster 5 - 7, distance = 0.181351790572, is_cluster = True
DEBUG:root:For cluster 7 - 18, distance = 10697.0211474, is_cluster = False
DEBUG:root:For cluster 18 - 20, distance = 0.0, is_cluster = True
DEBUG:root:For cluster 20 - 23, distance = 77.0287528643, is_cluster = True
DEBUG:root:For cluster 23 - 29, distance = 0.0478251850624, is_cluster = True
DEBUG:root:For cluster 29 - 40, distance = 9539.80014176, is_cluster = False
DEBUG:root:For cluster 40 - 41, distance = 0.0, is_cluster = True
DEBUG:root:For cluster 41 - 63, distance = 854.106845725, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 11
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Processing segment 10: Segment(40, 41, 0.0), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = 9
DEBUG:root:Processing segment 9: Segment(29, 40, 9539.80014176), expecting state Segment_State.GOOD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = 8
DEBUG:root:Processing segment 8: Segment(23, 29, 0.0478251850624), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = 7
DEBUG:root:Processing segment 7: Segment(20, 23, 77.0287528643), expecting state Segment_State.GOOD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = 6
DEBUG:root:Processing segment 6: Segment(18, 20, 0.0), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = 5
DEBUG:root:Processing segment 5: Segment(7, 18, 10697.0211474), expecting state Segment_State.GOOD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = 4
DEBUG:root:Processing segment 4: Segment(5, 7, 0.181351790572), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = 3
DEBUG:root:Processing segment 3: Segment(4, 5, 0.0), expecting state Segment_State.GOOD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = 2
DEBUG:root:Processing segment 2: Segment(3, 4, 0.0), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = 1
DEBUG:root:Processing segment 1: Segment(1, 3, 1748.77650602), expecting state Segment_State.GOOD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = 0
DEBUG:root:Processing segment 0: Segment(0, 1, 0.0), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = -1
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = [Segment(0, 1, 0.0), Segment(3, 4, 0.0), Segment(5, 7, 0.181351790572), Segment(18, 20, 0.0), Segment(23, 29, 0.0478251850624), Segment(40, 41, 0.0)]
DEBUG:root:after setting values, outlier_mask = [ 0 3 5 6 18 19 23 24 25 26 27 28 40]
DEBUG:root:quartile values are 0.25 1221.404373
0.75 30223.256567
Name: speed, dtype: float64
DEBUG:root:iqr 29001.8521937
filtered list size went from (78, 8) to (64, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1424354413.0}}, {'data.mTime': {'$lt': 1424356839.0}}], 'user_id': u'20150219T060013-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([1, 6, 9, 15, 19, 30, 31, 34, 60, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89], dtype='int64')
DEBUG:root:quartile values are 0.25 9281.975387
0.75 30727.541367
Name: speed, dtype: float64
DEBUG:root:iqr 21445.5659802
DEBUG:root:Found 4 potential outliers, list = [25 27 52 54]
DEBUG:root:Found 1 clusters with centers [[27]]
DEBUG:root:Considering candidate cluster center [27]
DEBUG:root:lowRange = max(22, 0) = 22 and highRange = max(32, 67) = 32
DEBUG:root:Area size = 11, index = Int64Index([22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32], dtype='int64') with size 11
DEBUG:root:In area 22 - 32, deleted 2 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:with speed df shape is (67, 10), ransac_mask size = 67
DEBUG:root:filtering done, ransac deleted points = [31 32]
filtered list size went from (90, 8) to (67, 8)
filtering points Int64Index([1, 6, 9, 15, 19, 30, 31, 34, 60, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89], dtype='int64')
filtered list size went from (90, 8) to (67, 8)
filtering points Int64Index([1, 6, 9, 15, 19, 30, 31, 34, 60, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89], dtype='int64')
DEBUG:root:quartile values are 0.25 9281.975387
0.75 30727.541367
Name: speed, dtype: float64
DEBUG:root:iqr 21445.5659802
DEBUG:root:For cluster 0 - 25, distance = 24778.01692, is_cluster = False
DEBUG:root:For cluster 25 - 27, distance = 0.00878824059465, is_cluster = True
DEBUG:root:For cluster 27 - 52, distance = 5640.65143695, is_cluster = False
DEBUG:root:For cluster 52 - 54, distance = 0.258120383936, is_cluster = True
DEBUG:root:For cluster 54 - 66, distance = 806.947938608, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 4
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Processing segment 3: Segment(52, 54, 0.258120383936), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = 2
DEBUG:root:Processing segment 2: Segment(27, 52, 5640.65143695), expecting state Segment_State.GOOD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = 1
DEBUG:root:Processing segment 1: Segment(25, 27, 0.00878824059465), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = 0
DEBUG:root:Processing segment 0: Segment(0, 25, 24778.01692), expecting state Segment_State.GOOD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = -1
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = [Segment(25, 27, 0.00878824059465), Segment(52, 54, 0.258120383936)]
DEBUG:root:after setting values, outlier_mask = [25 26 52 53]
DEBUG:root:quartile values are 0.25 9281.975387
0.75 29413.028293
Name: speed, dtype: float64
DEBUG:root:iqr 20131.052906
filtered list size went from (90, 8) to (67, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1424274838.0}}, {'data.mTime': {'$lt': 1424275635.0}}], 'user_id': u'20150218T075358-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([22, 23], dtype='int64')
DEBUG:root:quartile values are 0.25 9606.297536
0.75 34949.976083
Name: speed, dtype: float64
DEBUG:root:iqr 25343.6785468
DEBUG:root:Found 1 potential outliers, list = [7]
DEBUG:root:Only one candidate, cluster centers are [array([7])]
DEBUG:root:Considering candidate cluster center [7]
DEBUG:root:lowRange = max(2, 0) = 2 and highRange = max(12, 34) = 12
DEBUG:root:Area size = 11, index = Int64Index([2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], dtype='int64') with size 11
DEBUG:root:In area 2 - 12, deleted 4 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:with speed df shape is (34, 10), ransac_mask size = 34
DEBUG:root:filtering done, ransac deleted points = [2 4 5 6]
filtered list size went from (36, 8) to (34, 8)
filtering points Int64Index([22, 23], dtype='int64')
filtered list size went from (36, 8) to (34, 8)
filtering points Int64Index([22, 23], dtype='int64')
DEBUG:root:quartile values are 0.25 9606.297536
0.75 34949.976083
Name: speed, dtype: float64
DEBUG:root:iqr 25343.6785468
DEBUG:root:For cluster 0 - 7, distance = 5968.24776315, is_cluster = False
DEBUG:root:For cluster 7 - 33, distance = 8717.1016398, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 0
DEBUG:root:Processing segment 1: Segment(7, 33, 8717.1016398), expecting state Segment_State.BAD
DEBUG:root:For cluster 8 - 33, distance = 8543.66131917, is_cluster = False
DEBUG:root:For cluster 7 - 8, distance = 0.0, is_cluster = True
DEBUG:root:Finishing process for Segment(7, 8, 0.0) after splitting mixed cluster
DEBUG:root:At the end of the loop for direction IterationDirection.RIGHT, i = 2
DEBUG:root:Processing segment 2: Segment(8, 33, 8543.66131917), expecting state Segment_State.GOOD
DEBUG:root:At the end of the loop for direction IterationDirection.RIGHT, i = 3
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = [Segment(7, 8, 0.0)]
DEBUG:root:after setting values, outlier_mask = [7]
DEBUG:root:quartile values are 0.25 8689.314678
0.75 35028.618147
Name: speed, dtype: float64
DEBUG:root:iqr 26339.303469
filtered list size went from (36, 8) to (34, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1424399532.0}}, {'data.mTime': {'$lt': 1424401409.0}}], 'user_id': u'20150219T183212-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([0, 3, 4, 8, 9, 11, 12, 13, 15, 16, 17, 18, 21, 27, 28, 29, 35, 38, 39, 40, 41, 42], dtype='int64')
DEBUG:root:quartile values are 0.25 220.465776
0.75 28373.381580
Name: speed, dtype: float64
DEBUG:root:iqr 28152.9158035
DEBUG:root:Found 1 potential outliers, list = [2]
DEBUG:root:Only one candidate, cluster centers are [array([2])]
DEBUG:root:Considering candidate cluster center [2]
DEBUG:root:lowRange = max(-3, 0) = 0 and highRange = max(7, 31) = 7
DEBUG:root:Area size = 8, index = Int64Index([0, 1, 2, 3, 4, 5, 6, 7], dtype='int64') with size 8
DEBUG:root:In area 0 - 7, deleted 0 points through ransac filtering
DEBUG:root:Retain mask is of size 8
DEBUG:root:with speed df shape is (31, 10), ransac_mask size = 31
DEBUG:root:filtering done, ransac deleted points = []
filtered list size went from (53, 8) to (31, 8)
filtering points Int64Index([0, 3, 4, 8, 9, 11, 12, 13, 15, 16, 17, 18, 21, 27, 28, 29, 35, 38, 39, 40, 41, 42], dtype='int64')
filtered list size went from (53, 8) to (31, 8)
filtering points Int64Index([0, 3, 4, 8, 9, 11, 12, 13, 15, 16, 17, 18, 21, 27, 28, 29, 35, 38, 39, 40, 41, 42], dtype='int64')
DEBUG:root:quartile values are 0.25 220.465776
0.75 28373.381580
Name: speed, dtype: float64
DEBUG:root:iqr 28152.9158035
DEBUG:root:For cluster 0 - 2, distance = 0.299731899991, is_cluster = True
DEBUG:root:For cluster 2 - 30, distance = 30013.3052409, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 1
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Processing segment 0: Segment(0, 2, 0.299731899991), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = -1
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = [Segment(0, 2, 0.299731899991)]
DEBUG:root:after setting values, outlier_mask = [0 1]
DEBUG:root:quartile values are 0.25 292.840561
0.75 26629.759841
Name: speed, dtype: float64
DEBUG:root:iqr 26336.9192799
filtered list size went from (53, 8) to (31, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1424913286.0}}, {'data.mTime': {'$lt': 1424915700.0}}], 'user_id': u'20150225T171446-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([4, 6, 7, 10, 11, 12, 13, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 29, 30, 31, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 58], dtype='int64')
DEBUG:root:quartile values are 0.25 770.596937
0.75 7388.168584
Name: speed, dtype: float64
DEBUG:root:iqr 6617.57164674
DEBUG:root:Found 1 potential outliers, list = [11]
DEBUG:root:Only one candidate, cluster centers are [array([11])]
DEBUG:root:Considering candidate cluster center [11]
DEBUG:root:lowRange = max(6, 0) = 6 and highRange = max(16, 48) = 16
DEBUG:root:Area size = 11, index = Int64Index([6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], dtype='int64') with size 11
DEBUG:root:In area 6 - 16, deleted 0 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:with speed df shape is (48, 10), ransac_mask size = 48
DEBUG:root:filtering done, ransac deleted points = []
filtered list size went from (83, 8) to (48, 8)
filtering points Int64Index([4, 6, 7, 10, 11, 12, 13, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 29, 30, 31, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 58], dtype='int64')
filtered list size went from (83, 8) to (48, 8)
filtering points Int64Index([4, 6, 7, 10, 11, 12, 13, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 29, 30, 31, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 58], dtype='int64')
DEBUG:root:quartile values are 0.25 770.596937
0.75 7388.168584
Name: speed, dtype: float64
DEBUG:root:iqr 6617.57164674
DEBUG:root:For cluster 0 - 11, distance = 7182.7797677, is_cluster = False
DEBUG:root:For cluster 11 - 47, distance = 8722.17612105, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 0
DEBUG:root:Processing segment 1: Segment(11, 47, 8722.17612105), expecting state Segment_State.BAD
DEBUG:root:For cluster 12 - 47, distance = 5577.21722765, is_cluster = False
DEBUG:root:For cluster 11 - 12, distance = 0.0, is_cluster = True
DEBUG:root:Finishing process for Segment(11, 12, 0.0) after splitting mixed cluster
DEBUG:root:At the end of the loop for direction IterationDirection.RIGHT, i = 2
DEBUG:root:Processing segment 2: Segment(12, 47, 5577.21722765), expecting state Segment_State.GOOD
DEBUG:root:At the end of the loop for direction IterationDirection.RIGHT, i = 3
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = [Segment(11, 12, 0.0)]
DEBUG:root:after setting values, outlier_mask = [11]
DEBUG:root:quartile values are 0.25 746.616859
0.75 7334.863450
Name: speed, dtype: float64
DEBUG:root:iqr 6588.24659107
WARNING:root:After first round, still have outliers filter formatted_time idx key mAccuracy \
12 time 1970-01-17 03:48:34.207000 33 background/location 70
mLatitude mLongitude mTime distance speed
12 37.437212 -122.110813 1424914207 4414.805201 27421.150316
filtered list size went from (83, 8) to (48, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1426781606.0}}, {'data.mTime': {'$lt': 1426783410.0}}], 'user_id': u'20150319T081326-0700_0', 'metadata.filter': u'time'}
filtering points Int64Index([0, 4, 11, 12, 16, 17, 19, 20, 21, 27, 36, 37], dtype='int64')
DEBUG:root:quartile values are 0.25 4523.104446
0.75 10260.198653
Name: speed, dtype: float64
DEBUG:root:iqr 5737.09420602
DEBUG:root:Found 0 potential outliers, list = []
INFO:root:No potential outliers ([]), so no areas to consider
DEBUG:root:with speed df shape is (32, 10), ransac_mask size = 32
DEBUG:root:filtering done, ransac deleted points = []
filtered list size went from (44, 8) to (32, 8)
filtering points Int64Index([0, 4, 11, 12, 16, 17, 19, 20, 21, 27, 36, 37], dtype='int64')
filtered list size went from (44, 8) to (32, 8)
filtering points Int64Index([0, 4, 11, 12, 16, 17, 19, 20, 21, 27, 36, 37], dtype='int64')
DEBUG:root:quartile values are 0.25 4523.104446
0.75 10260.198653
Name: speed, dtype: float64
DEBUG:root:iqr 5737.09420602
DEBUG:root:For cluster 0 - 31, distance = 4638.38500057, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 0
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = []
DEBUG:root:after setting values, outlier_mask = []
DEBUG:root:quartile values are 0.25 4523.104446
0.75 10260.198653
Name: speed, dtype: float64
DEBUG:root:iqr 5737.09420602
filtered list size went from (44, 8) to (32, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1424959137.0}}, {'data.mTime': {'$lt': 1424960985.0}}], 'user_id': u'20150226T055857-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([4, 5, 13, 15, 20, 27, 28, 29, 32, 34, 35, 36, 40, 43, 44, 45], dtype='int64')
DEBUG:root:quartile values are 0.25 1107.569021
0.75 32350.156076
Name: speed, dtype: float64
DEBUG:root:iqr 31242.5870555
DEBUG:root:Found 0 potential outliers, list = []
INFO:root:No potential outliers ([]), so no areas to consider
DEBUG:root:with speed df shape is (40, 10), ransac_mask size = 40
DEBUG:root:filtering done, ransac deleted points = []
filtered list size went from (56, 8) to (40, 8)
filtering points Int64Index([4, 5, 13, 15, 20, 27, 28, 29, 32, 34, 35, 36, 40, 43, 44, 45], dtype='int64')
filtered list size went from (56, 8) to (40, 8)
filtering points Int64Index([4, 5, 13, 15, 20, 27, 28, 29, 32, 34, 35, 36, 40, 43, 44, 45], dtype='int64')
DEBUG:root:quartile values are 0.25 1107.569021
0.75 32350.156076
Name: speed, dtype: float64
DEBUG:root:iqr 31242.5870555
DEBUG:root:For cluster 0 - 39, distance = 34560.1838465, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 0
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = []
DEBUG:root:after setting values, outlier_mask = []
DEBUG:root:quartile values are 0.25 1107.569021
0.75 32350.156076
Name: speed, dtype: float64
DEBUG:root:iqr 31242.5870555
filtered list size went from (56, 8) to (40, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1427986613.0}}, {'data.mTime': {'$lt': 1427988358.0}}], 'user_id': u'20150402T065653-0700_0', 'metadata.filter': u'time'}
filtering points Int64Index([4, 9, 12, 19, 22, 29, 43, 44, 45, 47, 49, 53, 56], dtype='int64')
DEBUG:root:quartile values are 0.25 1524.906682
0.75 73028.029642
Name: speed, dtype: float64
DEBUG:root:iqr 71503.1229605
DEBUG:root:Found 8 potential outliers, list = [ 5 7 16 17 18 19 20 22]
DEBUG:root:Found 3 clusters with centers [[ 7]
[17]
[20]]
DEBUG:root:Considering candidate cluster center [7]
DEBUG:root:lowRange = max(2, 0) = 2 and highRange = max(12, 49) = 12
DEBUG:root:Considering candidate cluster center [17]
DEBUG:root:lowRange = max(12, 0) = 12 and highRange = max(22, 49) = 22
DEBUG:root:Considering candidate cluster center [20]
DEBUG:root:lowRange = max(15, 0) = 15 and highRange = max(25, 49) = 25
DEBUG:root:Area size = 11, index = Int64Index([2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], dtype='int64') with size 11
DEBUG:root:In area 2 - 12, deleted 0 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:Area size = 11, index = Int64Index([12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22], dtype='int64') with size 11
DEBUG:root:In area 12 - 22, deleted 0 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:Area size = 11, index = Int64Index([15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], dtype='int64') with size 11
DEBUG:root:In area 15 - 25, deleted 0 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:with speed df shape is (49, 10), ransac_mask size = 49
DEBUG:root:filtering done, ransac deleted points = []
filtered list size went from (62, 8) to (49, 8)
filtering points Int64Index([4, 9, 12, 19, 22, 29, 43, 44, 45, 47, 49, 53, 56], dtype='int64')
filtered list size went from (62, 8) to (49, 8)
filtering points Int64Index([4, 9, 12, 19, 22, 29, 43, 44, 45, 47, 49, 53, 56], dtype='int64')
DEBUG:root:quartile values are 0.25 1524.906682
0.75 73028.029642
Name: speed, dtype: float64
DEBUG:root:iqr 71503.1229605
DEBUG:root:For cluster 0 - 5, distance = 32.5320099855, is_cluster = True
DEBUG:root:For cluster 5 - 7, distance = 0.0625051273218, is_cluster = True
DEBUG:root:For cluster 7 - 16, distance = 6783.77009267, is_cluster = False
DEBUG:root:For cluster 16 - 17, distance = 0.0, is_cluster = True
DEBUG:root:For cluster 17 - 18, distance = 0.0, is_cluster = True
DEBUG:root:For cluster 18 - 19, distance = 0.0, is_cluster = True
DEBUG:root:For cluster 19 - 20, distance = 0.0, is_cluster = True
DEBUG:root:For cluster 20 - 22, distance = 0.116667615369, is_cluster = True
DEBUG:root:For cluster 22 - 48, distance = 17618.1723977, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 2
DEBUG:root:Processing segment 3: Segment(16, 17, 0.0), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.RIGHT, i = 4
DEBUG:root:Processing segment 4: Segment(17, 18, 0.0), expecting state Segment_State.GOOD
DEBUG:root:At the end of the loop for direction IterationDirection.RIGHT, i = 5
DEBUG:root:Processing segment 5: Segment(18, 19, 0.0), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.RIGHT, i = 6
DEBUG:root:Processing segment 6: Segment(19, 20, 0.0), expecting state Segment_State.GOOD
DEBUG:root:At the end of the loop for direction IterationDirection.RIGHT, i = 7
DEBUG:root:Processing segment 7: Segment(20, 22, 0.116667615369), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.RIGHT, i = 8
DEBUG:root:Processing segment 8: Segment(22, 48, 17618.1723977), expecting state Segment_State.GOOD
DEBUG:root:At the end of the loop for direction IterationDirection.RIGHT, i = 9
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Processing segment 1: Segment(5, 7, 0.0625051273218), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = 0
DEBUG:root:Processing segment 0: Segment(0, 5, 32.5320099855), expecting state Segment_State.GOOD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = -1
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = [Segment(5, 7, 0.0625051273218), Segment(16, 17, 0.0), Segment(18, 19, 0.0), Segment(20, 22, 0.116667615369)]
DEBUG:root:after setting values, outlier_mask = [ 5 6 16 18 20 21]
DEBUG:root:quartile values are 0.25 1748.532964
0.75 34625.160213
Name: speed, dtype: float64
DEBUG:root:iqr 32876.6272496
filtered list size went from (62, 8) to (49, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1424840848.0}}, {'data.mTime': {'$lt': 1424843764.0}}], 'user_id': u'20150224T210728-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([0, 1, 2, 3, 4, 10, 12, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 44, 56, 70, 78, 85], dtype='int64')
DEBUG:root:quartile values are 0.25 659.711828
0.75 20042.456237
Name: speed, dtype: float64
DEBUG:root:iqr 19382.744409
DEBUG:root:Found 0 potential outliers, list = []
INFO:root:No potential outliers ([]), so no areas to consider
DEBUG:root:with speed df shape is (69, 10), ransac_mask size = 69
DEBUG:root:filtering done, ransac deleted points = []
filtered list size went from (92, 8) to (69, 8)
filtering points Int64Index([0, 1, 2, 3, 4, 10, 12, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 44, 56, 70, 78, 85], dtype='int64')
filtered list size went from (92, 8) to (69, 8)
filtering points Int64Index([0, 1, 2, 3, 4, 10, 12, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 44, 56, 70, 78, 85], dtype='int64')
DEBUG:root:quartile values are 0.25 659.711828
0.75 20042.456237
Name: speed, dtype: float64
DEBUG:root:iqr 19382.744409
DEBUG:root:For cluster 0 - 68, distance = 31393.5240511, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 0
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = []
DEBUG:root:after setting values, outlier_mask = []
DEBUG:root:quartile values are 0.25 659.711828
0.75 20042.456237
Name: speed, dtype: float64
DEBUG:root:iqr 19382.744409
filtered list size went from (92, 8) to (69, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1427438739.0}}, {'data.mTime': {'$lt': 1427442530.0}}], 'user_id': u'20150326T224539-0700_0', 'metadata.filter': u'time'}
filtering points Int64Index([3, 18], dtype='int64')
DEBUG:root:quartile values are 0.25 5433.905822
0.75 29514.250118
Name: speed, dtype: float64
DEBUG:root:iqr 24080.3442955
DEBUG:root:Found 4 potential outliers, list = [ 8 11 13 14]
DEBUG:root:Found 2 clusters with centers [[ 8]
[13]]
DEBUG:root:Considering candidate cluster center [8]
DEBUG:root:lowRange = max(3, 0) = 3 and highRange = max(13, 34) = 13
DEBUG:root:Considering candidate cluster center [13]
DEBUG:root:lowRange = max(8, 0) = 8 and highRange = max(18, 34) = 18
DEBUG:root:Area size = 11, index = Int64Index([3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], dtype='int64') with size 11
DEBUG:root:In area 3 - 13, deleted 0 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:Area size = 11, index = Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], dtype='int64') with size 11
DEBUG:root:In area 8 - 18, deleted 0 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:with speed df shape is (34, 10), ransac_mask size = 34
DEBUG:root:filtering done, ransac deleted points = []
filtered list size went from (36, 8) to (34, 8)
filtering points Int64Index([3, 18], dtype='int64')
filtered list size went from (36, 8) to (34, 8)
filtering points Int64Index([3, 18], dtype='int64')
DEBUG:root:quartile values are 0.25 5433.905822
0.75 29514.250118
Name: speed, dtype: float64
DEBUG:root:iqr 24080.3442955
DEBUG:root:For cluster 0 - 8, distance = 5306.9524471, is_cluster = False
DEBUG:root:For cluster 8 - 11, distance = 0.102740880316, is_cluster = True
DEBUG:root:For cluster 11 - 13, distance = 0.0, is_cluster = True
DEBUG:root:For cluster 13 - 14, distance = 0.0, is_cluster = True
DEBUG:root:For cluster 14 - 33, distance = 9288.22834458, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 0
DEBUG:root:Processing segment 1: Segment(8, 11, 0.102740880316), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.RIGHT, i = 2
DEBUG:root:Processing segment 2: Segment(11, 13, 0.0), expecting state Segment_State.GOOD
DEBUG:root:At the end of the loop for direction IterationDirection.RIGHT, i = 3
DEBUG:root:Processing segment 3: Segment(13, 14, 0.0), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.RIGHT, i = 4
DEBUG:root:Processing segment 4: Segment(14, 33, 9288.22834458), expecting state Segment_State.GOOD
DEBUG:root:At the end of the loop for direction IterationDirection.RIGHT, i = 5
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = [Segment(8, 11, 0.102740880316), Segment(13, 14, 0.0)]
DEBUG:root:after setting values, outlier_mask = [ 8 9 10 13]
DEBUG:root:quartile values are 0.25 5433.905822
0.75 25602.280757
Name: speed, dtype: float64
DEBUG:root:iqr 20168.3749342
filtered list size went from (36, 8) to (34, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1425510248.0}}, {'data.mTime': {'$lt': 1425511429.0}}], 'user_id': u'20150304T150408-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35], dtype='int64')
DEBUG:root:quartile values are 0.25 13013.067760
0.75 17658.205856
Name: speed, dtype: float64
DEBUG:root:iqr 4645.13809668
DEBUG:root:Found 0 potential outliers, list = []
INFO:root:No potential outliers ([]), so no areas to consider
DEBUG:root:with speed df shape is (9, 10), ransac_mask size = 9
DEBUG:root:filtering done, ransac deleted points = []
DEBUG:root:quartile values are 0.25 13013.067760
0.75 17658.205856
Name: speed, dtype: float64
DEBUG:root:iqr 4645.13809668
DEBUG:root:For cluster 0 - 8, distance = 3514.63527105, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 0
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = []
DEBUG:root:after setting values, outlier_mask = []
DEBUG:root:quartile values are 0.25 13013.067760
0.75 17658.205856
Name: speed, dtype: float64
DEBUG:root:iqr 4645.13809668
filtered list size went from (36, 8) to (9, 8)
filtering points Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35], dtype='int64')
filtered list size went from (36, 8) to (9, 8)
filtering points Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35], dtype='int64')
filtered list size went from (36, 8) to (9, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1428030827.0}}, {'data.mTime': {'$lt': 1428033415.0}}], 'user_id': u'20150402T191347-0700_0', 'metadata.filter': u'time'}
filtering points Int64Index([1, 5, 6, 7, 8, 11, 12, 15, 16, 18, 19, 20, 21, 22, 24, 25, 27, 28, 33, 34, 36, 37, 39, 40, 42, 43, 62, 63, 86, 95, 97], dtype='int64')
DEBUG:root:quartile values are 0.25 5741.488663
0.75 26557.891276
Name: speed, dtype: float64
DEBUG:root:iqr 20816.4026134
DEBUG:root:Found 0 potential outliers, list = []
INFO:root:No potential outliers ([]), so no areas to consider
DEBUG:root:with speed df shape is (77, 10), ransac_mask size = 77
DEBUG:root:filtering done, ransac deleted points = []
filtered list size went from (108, 8) to (77, 8)
filtering points Int64Index([1, 5, 6, 7, 8, 11, 12, 15, 16, 18, 19, 20, 21, 22, 24, 25, 27, 28, 33, 34, 36, 37, 39, 40, 42, 43, 62, 63, 86, 95, 97], dtype='int64')
filtered list size went from (108, 8) to (77, 8)
filtering points Int64Index([1, 5, 6, 7, 8, 11, 12, 15, 16, 18, 19, 20, 21, 22, 24, 25, 27, 28, 33, 34, 36, 37, 39, 40, 42, 43, 62, 63, 86, 95, 97], dtype='int64')
DEBUG:root:quartile values are 0.25 5741.488663
0.75 26557.891276
Name: speed, dtype: float64
DEBUG:root:iqr 20816.4026134
DEBUG:root:For cluster 0 - 76, distance = 35583.8047667, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 0
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = []
DEBUG:root:after setting values, outlier_mask = []
DEBUG:root:quartile values are 0.25 5741.488663
0.75 26557.891276
Name: speed, dtype: float64
DEBUG:root:iqr 20816.4026134
filtered list size went from (108, 8) to (77, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1423190018.0}}, {'data.mTime': {'$lt': 1423191760.0}}], 'user_id': u'20150205T183338-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([6, 15, 16, 17, 21, 34, 41, 42, 43, 45, 50], dtype='int64')
DEBUG:root:quartile values are 0.25 13582.129976
0.75 35938.013187
Name: speed, dtype: float64
DEBUG:root:iqr 22355.8832102
DEBUG:root:Found 2 potential outliers, list = [35 36]
DEBUG:root:Found 2 clusters with centers [[35]
[36]]
DEBUG:root:Considering candidate cluster center [35]
DEBUG:root:lowRange = max(30, 0) = 30 and highRange = max(40, 44) = 40
DEBUG:root:Considering candidate cluster center [36]
DEBUG:root:lowRange = max(31, 0) = 31 and highRange = max(41, 44) = 41
DEBUG:root:Area size = 11, index = Int64Index([30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40], dtype='int64') with size 11
DEBUG:root:In area 30 - 40, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:Area size = 11, index = Int64Index([31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41], dtype='int64') with size 11
DEBUG:root:In area 31 - 41, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:with speed df shape is (44, 10), ransac_mask size = 44
DEBUG:root:filtering done, ransac deleted points = [35]
filtered list size went from (55, 8) to (44, 8)
filtering points Int64Index([6, 15, 16, 17, 21, 34, 41, 42, 43, 45, 50], dtype='int64')
filtered list size went from (55, 8) to (44, 8)
filtering points Int64Index([6, 15, 16, 17, 21, 34, 41, 42, 43, 45, 50], dtype='int64')
DEBUG:root:quartile values are 0.25 13582.129976
0.75 35938.013187
Name: speed, dtype: float64
DEBUG:root:iqr 22355.8832102
DEBUG:root:For cluster 0 - 35, distance = 24768.447414, is_cluster = False
DEBUG:root:For cluster 35 - 36, distance = 0.0, is_cluster = True
DEBUG:root:For cluster 36 - 43, distance = 2692.71630165, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 2
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Processing segment 1: Segment(35, 36, 0.0), expecting state Segment_State.BAD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = 0
DEBUG:root:Processing segment 0: Segment(0, 35, 24768.447414), expecting state Segment_State.GOOD
DEBUG:root:At the end of the loop for direction IterationDirection.LEFT, i = -1
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = [Segment(35, 36, 0.0)]
DEBUG:root:after setting values, outlier_mask = [35]
DEBUG:root:quartile values are 0.25 13407.670110
0.75 31372.197583
Name: speed, dtype: float64
DEBUG:root:iqr 17964.5274734
filtered list size went from (55, 8) to (44, 8)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1425340381.0}}, {'data.mTime': {'$lt': 1425341326.0}}], 'user_id': u'20150302T155301-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([0, 1, 7, 9, 12, 13, 14, 15, 16, 17, 18], dtype='int64')
DEBUG:root:quartile values are 0.25 216.372753
0.75 17667.935398
Name: speed, dtype: float64
DEBUG:root:iqr 17451.5626453
DEBUG:root:Found 0 potential outliers, list = []
INFO:root:No potential outliers ([]), so no areas to consider
DEBUG:root:with speed df shape is (20, 10), ransac_mask size = 20
DEBUG:root:filtering done, ransac deleted points = []
DEBUG:root:quartile values are 0.25 216.372753
0.75 17667.935398
Name: speed, dtype: float64
DEBUG:root:iqr 17451.5626453
DEBUG:root:For cluster 0 - 19, distance = 10649.0207288, is_cluster = False
DEBUG:root:shortest_non_cluster_segment = 0
DEBUG:root:Finished marking segment states for direction IterationDirection.RIGHT
DEBUG:root:Finished marking segment states for direction IterationDirection.LEFT
DEBUG:root:unknown_segments = []
DEBUG:root:bad_segments = []
DEBUG:root:after setting values, outlier_mask = []
DEBUG:root:quartile values are 0.25 216.372753
0.75 17667.935398
Name: speed, dtype: float64
DEBUG:root:iqr 17451.5626453
filtered list size went from (31, 8) to (20, 8)
filtering points Int64Index([0, 1, 7, 9, 12, 13, 14, 15, 16, 17, 18], dtype='int64')
filtered list size went from (31, 8) to (20, 8)
filtering points Int64Index([0, 1, 7, 9, 12, 13, 14, 15, 16, 17, 18], dtype='int64')
filtered list size went from (31, 8) to (20, 8)
In [37]:
ipy.inline_maps(map_list, len(map_list), 4)
Out[37]:
In [33]:
len(section_list)
Out[33]:
32
In [37]:
tml = lo.evaluate_filtering([section_list[2]], [cso.BoxplotOutlier(), cso.SimpleQuartileOutlier()],
[cjs.SmoothPiecewiseRansac(), cjs.SmoothBoundary(), cjs.SmoothPosdap()])
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1425312783.0}}, {'data.mTime': {'$lt': 1425313388.0}}], 'user_id': u'20150302T081303-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 1968.738476
0.75 21463.359865
Name: speed, dtype: float64
DEBUG:root:iqr 19494.6213888
DEBUG:root:Found 3 potential outliers, list = [ 1 12 13]
DEBUG:root:Found 2 clusters with centers [[ 1]
[13]]
DEBUG:root:Considering candidate cluster center [1]
DEBUG:root:lowRange = max(-4, 0) = 0 and highRange = max(6, 17) = 6
DEBUG:root:Considering candidate cluster center [13]
DEBUG:root:lowRange = max(8, 0) = 8 and highRange = max(18, 17) = 17
DEBUG:root:Area size = 7, index = Int64Index([0, 1, 2, 3, 4, 5, 6], dtype='int64') with size 7
DEBUG:root:In area 0 - 6, deleted 2 points through ransac filtering
DEBUG:root:Retain mask is of size 7
DEBUG:root:Area size = 9, index = Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16], dtype='int64') with size 9
DEBUG:root:In area 8 - 16, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:with speed df shape is (17, 9), ransac_mask size = 17
DEBUG:root:filtering done, ransac deleted points = [0]
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 1968.738476
0.75 21463.359865
Name: speed, dtype: float64
DEBUG:root:iqr 19494.6213888
DEBUG:root:while considering point AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 102051.202075
DEBUG:root:currSpeed > 79947.2240317, removing index 1
DEBUG:root:while considering point AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})(2), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 41493.023892
DEBUG:root:currSpeed < 79947.2240317, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})(3), prev_pt (AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})) speed = 313.046615333
DEBUG:root:currSpeed < 79947.2240317, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})(4), prev_pt (AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})) speed = 123.943165016
DEBUG:root:currSpeed < 79947.2240317, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})(5), prev_pt (AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})) speed = 1968.73847641
DEBUG:root:currSpeed < 79947.2240317, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})(6), prev_pt (AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})) speed = 27951.0481792
DEBUG:root:currSpeed < 79947.2240317, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})(7), prev_pt (AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})) speed = 712.612180782
DEBUG:root:currSpeed < 79947.2240317, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})(8), prev_pt (AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})) speed = 14095.3272942
DEBUG:root:currSpeed < 79947.2240317, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})(9), prev_pt (AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})) speed = 14682.4165026
DEBUG:root:currSpeed < 79947.2240317, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})(10), prev_pt (AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})) speed = 19165.6250991
DEBUG:root:currSpeed < 79947.2240317, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})(11), prev_pt (AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})) speed = 3949.0168767
DEBUG:root:currSpeed < 79947.2240317, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})(12), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 95603.8467501
DEBUG:root:currSpeed > 79947.2240317, removing index 12
DEBUG:root:while considering point AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})(13), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 8047.59417975
DEBUG:root:currSpeed < 79947.2240317, retaining index 13
DEBUG:root:while considering point AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})(14), prev_pt (AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})) speed = 14730.1201174
DEBUG:root:currSpeed < 79947.2240317, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})(15), prev_pt (AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})) speed = 21463.3598652
DEBUG:root:currSpeed < 79947.2240317, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 5151.0763588560403, u'mLongitude': -121.9436018, u'mLatitude': 37.285262600000003, u'mTime': 1425313353.0})(16), prev_pt (AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})) speed = 5151.07635886
DEBUG:root:currSpeed < 79947.2240317, retaining index 16
INFO:root:Filtering complete, removed indices = [ 0 2 3 4 5 6 7 8 9 10 11 13 14 15 16]
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 1968.738476
0.75 21463.359865
Name: speed, dtype: float64
DEBUG:root:iqr 19494.6213888
INFO:root:len(last_segment) = 0, len(curr_segment) = 11, skipping
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
DEBUG:root:Found 1 potential outliers, list = [13]
DEBUG:root:Only one candidate, cluster centers are [array([13])]
DEBUG:root:Considering candidate cluster center [13]
DEBUG:root:lowRange = max(8, 0) = 8 and highRange = max(18, 17) = 17
DEBUG:root:Area size = 9, index = Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16], dtype='int64') with size 9
DEBUG:root:In area 8 - 16, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:with speed df shape is (17, 9), ransac_mask size = 17
DEBUG:root:filtering done, ransac deleted points = [0]
filtered list size went from (23, 8) to (17, 8)
while considering point 1, speed = 102051.202075
currSpeed > 79947, starting new quality segment at index 1
while considering point 2, speed = 14981.4125929
currSpeed < 79947, retaining index 2 in existing quality segment
while considering point 3, speed = 313.046615333
currSpeed < 79947, retaining index 3 in existing quality segment
while considering point 4, speed = 123.943165016
currSpeed < 79947, retaining index 4 in existing quality segment
while considering point 5, speed = 1968.73847641
currSpeed < 79947, retaining index 5 in existing quality segment
while considering point 6, speed = 27951.0481792
currSpeed < 79947, retaining index 6 in existing quality segment
while considering point 7, speed = 712.612180782
currSpeed < 79947, retaining index 7 in existing quality segment
while considering point 8, speed = 14095.3272942
currSpeed < 79947, retaining index 8 in existing quality segment
while considering point 9, speed = 14682.4165026
currSpeed < 79947, retaining index 9 in existing quality segment
while considering point 10, speed = 19165.6250991
currSpeed < 79947, retaining index 10 in existing quality segment
while considering point 11, speed = 3949.0168767
currSpeed < 79947, retaining index 11 in existing quality segment
while considering point 12, speed = 95603.8467501
currSpeed > 79947, starting new quality segment at index 12
while considering point 13, speed = 273955.752383
currSpeed > 79947, starting new quality segment at index 13
while considering point 14, speed = 14730.1201174
currSpeed < 79947, retaining index 14 in existing quality segment
while considering point 15, speed = 21463.3598652
currSpeed < 79947, retaining index 15 in existing quality segment
while considering point 16, speed = 5151.07635886
currSpeed < 79947, retaining index 16 in existing quality segment
Number of quality segments is 4
Considering segments [] and [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
Considering segments [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] and [12]
About to compare curr_segment duration 0.0 with last segment duration 313.0
curr segment [12] is shorter, cut it
Comparing distance 6405.45773225 with speed 79947.2240317 * time 67.0 = 5356464.01013
Considering segments [12] and [13, 14, 15, 16]
About to compare curr_segment duration 127.0 with last segment duration 0.0
prev segment [12] is shorter, cut it
Comparing distance 8259.27716888 with speed 79947.2240317 * time 153.0 = 12231925.2769
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:while considering point AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 102051.202075
DEBUG:root:currSpeed < 246451.024334, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})(2), prev_pt (AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})) speed = 14981.4125929
DEBUG:root:currSpeed < 246451.024334, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})(3), prev_pt (AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})) speed = 313.046615333
DEBUG:root:currSpeed < 246451.024334, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})(4), prev_pt (AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})) speed = 123.943165016
DEBUG:root:currSpeed < 246451.024334, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})(5), prev_pt (AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})) speed = 1968.73847641
DEBUG:root:currSpeed < 246451.024334, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})(6), prev_pt (AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})) speed = 27951.0481792
DEBUG:root:currSpeed < 246451.024334, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})(7), prev_pt (AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})) speed = 712.612180782
DEBUG:root:currSpeed < 246451.024334, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})(8), prev_pt (AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})) speed = 14095.3272942
DEBUG:root:currSpeed < 246451.024334, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})(9), prev_pt (AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})) speed = 14682.4165026
DEBUG:root:currSpeed < 246451.024334, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})(10), prev_pt (AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})) speed = 19165.6250991
DEBUG:root:currSpeed < 246451.024334, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})(11), prev_pt (AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})) speed = 3949.0168767
DEBUG:root:currSpeed < 246451.024334, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})(12), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 95603.8467501
DEBUG:root:currSpeed < 246451.024334, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})(13), prev_pt (AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})) speed = 273955.752383
DEBUG:root:currSpeed > 246451.024334, removing index 13
DEBUG:root:while considering point AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})(14), prev_pt (AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})) speed = 126394.677754
DEBUG:root:currSpeed < 246451.024334, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})(15), prev_pt (AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})) speed = 21463.3598652
DEBUG:root:currSpeed < 246451.024334, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 5151.0763588560403, u'mLongitude': -121.9436018, u'mLatitude': 37.285262600000003, u'mTime': 1425313353.0})(16), prev_pt (AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})) speed = 5151.07635886
DEBUG:root:currSpeed < 246451.024334, retaining index 16
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16]
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
while considering point 1, speed = 102051.202075
currSpeed < 246451, retaining index 1 in existing quality segment
while considering point 2, speed = 14981.4125929
currSpeed < 246451, retaining index 2 in existing quality segment
while considering point 3, speed = 313.046615333
currSpeed < 246451, retaining index 3 in existing quality segment
while considering point 4, speed = 123.943165016
currSpeed < 246451, retaining index 4 in existing quality segment
while considering point 5, speed = 1968.73847641
currSpeed < 246451, retaining index 5 in existing quality segment
while considering point 6, speed = 27951.0481792
currSpeed < 246451, retaining index 6 in existing quality segment
while considering point 7, speed = 712.612180782
currSpeed < 246451, retaining index 7 in existing quality segment
while considering point 8, speed = 14095.3272942
currSpeed < 246451, retaining index 8 in existing quality segment
while considering point 9, speed = 14682.4165026
currSpeed < 246451, retaining index 9 in existing quality segment
while considering point 10, speed = 19165.6250991
currSpeed < 246451, retaining index 10 in existing quality segment
while considering point 11, speed = 3949.0168767
currSpeed < 246451, retaining index 11 in existing quality segment
while considering point 12, speed = 95603.8467501
currSpeed < 246451, retaining index 12 in existing quality segment
while considering point 13, speed = 273955.752383
currSpeed > 246451, starting new quality segment at index 13
while considering point 14, speed = 14730.1201174
currSpeed < 246451, retaining index 14 in existing quality segment
while considering point 15, speed = 21463.3598652
currSpeed < 246451, retaining index 15 in existing quality segment
while considering point 16, speed = 5151.07635886
currSpeed < 246451, retaining index 16 in existing quality segment
Number of quality segments is 2
Considering segments [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] and [13, 14, 15, 16]
About to compare curr_segment duration 127.0 with last segment duration 380.0
curr segment [13, 14, 15, 16] is shorter, cut it
Comparing distance 7122.84956196 with speed 246451.024334 * time 26.0 = 6407726.63268
Comparing distance 7583.68066524 with speed 246451.024334 * time 60.0 = 14787061.46
Comparing distance 7904.40278189 with speed 246451.024334 * time 83.0 = 20455435.0197
Comparing distance 8259.27716888 with speed 246451.024334 * time 153.0 = 37707006.7231
In [38]:
ipy.inline_maps(two_rows(tml[0]), 2, 4)
Out[38]:
In [40]:
def repeat_multiple(section, iterCount):
map_list = []
for i in range(iterCount):
map_list.append(lo.evaluate_filtering([section], [cso.BoxplotOutlier(ignore_zeros=True), cso.SimpleQuartileOutlier(ignore_zeros=True)],
[cjs.SmoothPiecewiseRansac(), cjs.SmoothBoundary(), cjs.SmoothPosdap()]))
logging.debug("Returning list with length %s" % len(map_list))
return map_list
In [41]:
section2_times10 = repeat_multiple(section_list[2], 10)
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1425312783.0}}, {'data.mTime': {'$lt': 1425313388.0}}], 'user_id': u'20150302T081303-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
DEBUG:root:Found 3 potential outliers, list = [ 1 12 13]
DEBUG:root:Found 2 clusters with centers [[ 1]
[13]]
DEBUG:root:Considering candidate cluster center [1]
DEBUG:root:lowRange = max(-4, 0) = 0 and highRange = max(6, 17) = 6
DEBUG:root:Considering candidate cluster center [13]
DEBUG:root:lowRange = max(8, 0) = 8 and highRange = max(18, 17) = 17
DEBUG:root:Area size = 7, index = Int64Index([0, 1, 2, 3, 4, 5, 6], dtype='int64') with size 7
DEBUG:root:In area 0 - 6, deleted 2 points through ransac filtering
DEBUG:root:Retain mask is of size 7
DEBUG:root:Area size = 9, index = Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16], dtype='int64') with size 9
DEBUG:root:In area 8 - 16, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:with speed df shape is (17, 9), ransac_mask size = 17
DEBUG:root:filtering done, ransac deleted points = [0]
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
DEBUG:root:while considering point AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 102051.202075
DEBUG:root:currSpeed > 81979.285945, removing index 1
DEBUG:root:while considering point AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})(2), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 41493.023892
DEBUG:root:currSpeed < 81979.285945, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})(3), prev_pt (AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})) speed = 313.046615333
DEBUG:root:currSpeed < 81979.285945, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})(4), prev_pt (AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})) speed = 123.943165016
DEBUG:root:currSpeed < 81979.285945, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})(5), prev_pt (AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})) speed = 1968.73847641
DEBUG:root:currSpeed < 81979.285945, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})(6), prev_pt (AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})) speed = 27951.0481792
DEBUG:root:currSpeed < 81979.285945, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})(7), prev_pt (AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})) speed = 712.612180782
DEBUG:root:currSpeed < 81979.285945, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})(8), prev_pt (AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})) speed = 14095.3272942
DEBUG:root:currSpeed < 81979.285945, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})(9), prev_pt (AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})) speed = 14682.4165026
DEBUG:root:currSpeed < 81979.285945, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})(10), prev_pt (AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})) speed = 19165.6250991
DEBUG:root:currSpeed < 81979.285945, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})(11), prev_pt (AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})) speed = 3949.0168767
DEBUG:root:currSpeed < 81979.285945, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})(12), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 95603.8467501
DEBUG:root:currSpeed > 81979.285945, removing index 12
DEBUG:root:while considering point AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})(13), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 8047.59417975
DEBUG:root:currSpeed < 81979.285945, retaining index 13
DEBUG:root:while considering point AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})(14), prev_pt (AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})) speed = 14730.1201174
DEBUG:root:currSpeed < 81979.285945, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})(15), prev_pt (AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})) speed = 21463.3598652
DEBUG:root:currSpeed < 81979.285945, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 5151.0763588560403, u'mLongitude': -121.9436018, u'mLatitude': 37.285262600000003, u'mTime': 1425313353.0})(16), prev_pt (AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})) speed = 5151.07635886
DEBUG:root:currSpeed < 81979.285945, retaining index 16
INFO:root:Filtering complete, removed indices = [ 0 2 3 4 5 6 7 8 9 10 11 13 14 15 16]
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
INFO:root:len(last_segment) = 0, len(curr_segment) = 11, skipping
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
DEBUG:root:Found 1 potential outliers, list = [13]
DEBUG:root:Only one candidate, cluster centers are [array([13])]
DEBUG:root:Considering candidate cluster center [13]
DEBUG:root:lowRange = max(8, 0) = 8 and highRange = max(18, 17) = 17
DEBUG:root:Area size = 9, index = Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16], dtype='int64') with size 9
DEBUG:root:In area 8 - 16, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:with speed df shape is (17, 9), ransac_mask size = 17
DEBUG:root:filtering done, ransac deleted points = [0]
filtered list size went from (23, 8) to (17, 8)
while considering point 1, speed = 102051.202075
currSpeed > 81979, starting new quality segment at index 1
while considering point 2, speed = 14981.4125929
currSpeed < 81979, retaining index 2 in existing quality segment
while considering point 3, speed = 313.046615333
currSpeed < 81979, retaining index 3 in existing quality segment
while considering point 4, speed = 123.943165016
currSpeed < 81979, retaining index 4 in existing quality segment
while considering point 5, speed = 1968.73847641
currSpeed < 81979, retaining index 5 in existing quality segment
while considering point 6, speed = 27951.0481792
currSpeed < 81979, retaining index 6 in existing quality segment
while considering point 7, speed = 712.612180782
currSpeed < 81979, retaining index 7 in existing quality segment
while considering point 8, speed = 14095.3272942
currSpeed < 81979, retaining index 8 in existing quality segment
while considering point 9, speed = 14682.4165026
currSpeed < 81979, retaining index 9 in existing quality segment
while considering point 10, speed = 19165.6250991
currSpeed < 81979, retaining index 10 in existing quality segment
while considering point 11, speed = 3949.0168767
currSpeed < 81979, retaining index 11 in existing quality segment
while considering point 12, speed = 95603.8467501
currSpeed > 81979, starting new quality segment at index 12
while considering point 13, speed = 273955.752383
currSpeed > 81979, starting new quality segment at index 13
while considering point 14, speed = 14730.1201174
currSpeed < 81979, retaining index 14 in existing quality segment
while considering point 15, speed = 21463.3598652
currSpeed < 81979, retaining index 15 in existing quality segment
while considering point 16, speed = 5151.07635886
currSpeed < 81979, retaining index 16 in existing quality segment
Number of quality segments is 4
Considering segments [] and [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
Considering segments [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] and [12]
About to compare curr_segment duration 0.0 with last segment duration 313.0
curr segment [12] is shorter, cut it
Comparing distance 6405.45773225 with speed 81979.285945 * time 67.0 = 5492612.15832
Considering segments [12] and [13, 14, 15, 16]
About to compare curr_segment duration 127.0 with last segment duration 0.0
prev segment [12] is shorter, cut it
Comparing distance 8259.27716888 with speed 81979.285945 * time 153.0 = 12542830.7496
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:while considering point AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 102051.202075
DEBUG:root:currSpeed < 248170.069837, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})(2), prev_pt (AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})) speed = 14981.4125929
DEBUG:root:currSpeed < 248170.069837, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})(3), prev_pt (AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})) speed = 313.046615333
DEBUG:root:currSpeed < 248170.069837, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})(4), prev_pt (AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})) speed = 123.943165016
DEBUG:root:currSpeed < 248170.069837, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})(5), prev_pt (AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})) speed = 1968.73847641
DEBUG:root:currSpeed < 248170.069837, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})(6), prev_pt (AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})) speed = 27951.0481792
DEBUG:root:currSpeed < 248170.069837, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})(7), prev_pt (AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})) speed = 712.612180782
DEBUG:root:currSpeed < 248170.069837, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})(8), prev_pt (AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})) speed = 14095.3272942
DEBUG:root:currSpeed < 248170.069837, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})(9), prev_pt (AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})) speed = 14682.4165026
DEBUG:root:currSpeed < 248170.069837, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})(10), prev_pt (AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})) speed = 19165.6250991
DEBUG:root:currSpeed < 248170.069837, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})(11), prev_pt (AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})) speed = 3949.0168767
DEBUG:root:currSpeed < 248170.069837, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})(12), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 95603.8467501
DEBUG:root:currSpeed < 248170.069837, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})(13), prev_pt (AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})) speed = 273955.752383
DEBUG:root:currSpeed > 248170.069837, removing index 13
DEBUG:root:while considering point AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})(14), prev_pt (AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})) speed = 126394.677754
DEBUG:root:currSpeed < 248170.069837, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})(15), prev_pt (AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})) speed = 21463.3598652
DEBUG:root:currSpeed < 248170.069837, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 5151.0763588560403, u'mLongitude': -121.9436018, u'mLatitude': 37.285262600000003, u'mTime': 1425313353.0})(16), prev_pt (AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})) speed = 5151.07635886
DEBUG:root:currSpeed < 248170.069837, retaining index 16
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16]
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
while considering point 1, speed = 102051.202075
currSpeed < 248170, retaining index 1 in existing quality segment
while considering point 2, speed = 14981.4125929
currSpeed < 248170, retaining index 2 in existing quality segment
while considering point 3, speed = 313.046615333
currSpeed < 248170, retaining index 3 in existing quality segment
while considering point 4, speed = 123.943165016
currSpeed < 248170, retaining index 4 in existing quality segment
while considering point 5, speed = 1968.73847641
currSpeed < 248170, retaining index 5 in existing quality segment
while considering point 6, speed = 27951.0481792
currSpeed < 248170, retaining index 6 in existing quality segment
while considering point 7, speed = 712.612180782
currSpeed < 248170, retaining index 7 in existing quality segment
while considering point 8, speed = 14095.3272942
currSpeed < 248170, retaining index 8 in existing quality segment
while considering point 9, speed = 14682.4165026
currSpeed < 248170, retaining index 9 in existing quality segment
while considering point 10, speed = 19165.6250991
currSpeed < 248170, retaining index 10 in existing quality segment
while considering point 11, speed = 3949.0168767
currSpeed < 248170, retaining index 11 in existing quality segment
while considering point 12, speed = 95603.8467501
currSpeed < 248170, retaining index 12 in existing quality segment
while considering point 13, speed = 273955.752383
currSpeed > 248170, starting new quality segment at index 13
while considering point 14, speed = 14730.1201174
currSpeed < 248170, retaining index 14 in existing quality segment
while considering point 15, speed = 21463.3598652
currSpeed < 248170, retaining index 15 in existing quality segment
while considering point 16, speed = 5151.07635886
currSpeed < 248170, retaining index 16 in existing quality segment
Number of quality segments is 2
Considering segments [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] and [13, 14, 15, 16]
About to compare curr_segment duration 127.0 with last segment duration 380.0
curr segment [13, 14, 15, 16] is shorter, cut it
Comparing distance 7122.84956196 with speed 248170.069837 * time 26.0 = 6452421.81576
Comparing distance 7583.68066524 with speed 248170.069837 * time 60.0 = 14890204.1902
Comparing distance 7904.40278189 with speed 248170.069837 * time 83.0 = 20598115.7965
Comparing distance 8259.27716888 with speed 248170.069837 * time 153.0 = 37970020.685
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1425312783.0}}, {'data.mTime': {'$lt': 1425313388.0}}], 'user_id': u'20150302T081303-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
DEBUG:root:Found 3 potential outliers, list = [ 1 12 13]
DEBUG:root:Found 2 clusters with centers [[ 1]
[13]]
DEBUG:root:Considering candidate cluster center [1]
DEBUG:root:lowRange = max(-4, 0) = 0 and highRange = max(6, 17) = 6
DEBUG:root:Considering candidate cluster center [13]
DEBUG:root:lowRange = max(8, 0) = 8 and highRange = max(18, 17) = 17
DEBUG:root:Area size = 7, index = Int64Index([0, 1, 2, 3, 4, 5, 6], dtype='int64') with size 7
DEBUG:root:In area 0 - 6, deleted 2 points through ransac filtering
DEBUG:root:Retain mask is of size 7
DEBUG:root:Area size = 9, index = Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16], dtype='int64') with size 9
DEBUG:root:In area 8 - 16, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:with speed df shape is (17, 9), ransac_mask size = 17
DEBUG:root:filtering done, ransac deleted points = [0]
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
DEBUG:root:while considering point AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 102051.202075
DEBUG:root:currSpeed > 81979.285945, removing index 1
DEBUG:root:while considering point AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})(2), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 41493.023892
DEBUG:root:currSpeed < 81979.285945, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})(3), prev_pt (AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})) speed = 313.046615333
DEBUG:root:currSpeed < 81979.285945, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})(4), prev_pt (AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})) speed = 123.943165016
DEBUG:root:currSpeed < 81979.285945, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})(5), prev_pt (AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})) speed = 1968.73847641
DEBUG:root:currSpeed < 81979.285945, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})(6), prev_pt (AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})) speed = 27951.0481792
DEBUG:root:currSpeed < 81979.285945, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})(7), prev_pt (AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})) speed = 712.612180782
DEBUG:root:currSpeed < 81979.285945, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})(8), prev_pt (AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})) speed = 14095.3272942
DEBUG:root:currSpeed < 81979.285945, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})(9), prev_pt (AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})) speed = 14682.4165026
DEBUG:root:currSpeed < 81979.285945, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})(10), prev_pt (AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})) speed = 19165.6250991
DEBUG:root:currSpeed < 81979.285945, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})(11), prev_pt (AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})) speed = 3949.0168767
DEBUG:root:currSpeed < 81979.285945, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})(12), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 95603.8467501
DEBUG:root:currSpeed > 81979.285945, removing index 12
DEBUG:root:while considering point AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})(13), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 8047.59417975
DEBUG:root:currSpeed < 81979.285945, retaining index 13
DEBUG:root:while considering point AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})(14), prev_pt (AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})) speed = 14730.1201174
DEBUG:root:currSpeed < 81979.285945, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})(15), prev_pt (AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})) speed = 21463.3598652
DEBUG:root:currSpeed < 81979.285945, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 5151.0763588560403, u'mLongitude': -121.9436018, u'mLatitude': 37.285262600000003, u'mTime': 1425313353.0})(16), prev_pt (AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})) speed = 5151.07635886
DEBUG:root:currSpeed < 81979.285945, retaining index 16
INFO:root:Filtering complete, removed indices = [ 0 2 3 4 5 6 7 8 9 10 11 13 14 15 16]
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
while considering point 1, speed = 102051.202075
INFO:root:len(last_segment) = 0, len(curr_segment) = 11, skipping
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
DEBUG:root:Found 1 potential outliers, list = [13]
DEBUG:root:Only one candidate, cluster centers are [array([13])]
DEBUG:root:Considering candidate cluster center [13]
DEBUG:root:lowRange = max(8, 0) = 8 and highRange = max(18, 17) = 17
DEBUG:root:Area size = 9, index = Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16], dtype='int64') with size 9
DEBUG:root:In area 8 - 16, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:with speed df shape is (17, 9), ransac_mask size = 17
DEBUG:root:filtering done, ransac deleted points = [0]
currSpeed > 81979, starting new quality segment at index 1
while considering point 2, speed = 14981.4125929
currSpeed < 81979, retaining index 2 in existing quality segment
while considering point 3, speed = 313.046615333
currSpeed < 81979, retaining index 3 in existing quality segment
while considering point 4, speed = 123.943165016
currSpeed < 81979, retaining index 4 in existing quality segment
while considering point 5, speed = 1968.73847641
currSpeed < 81979, retaining index 5 in existing quality segment
while considering point 6, speed = 27951.0481792
currSpeed < 81979, retaining index 6 in existing quality segment
while considering point 7, speed = 712.612180782
currSpeed < 81979, retaining index 7 in existing quality segment
while considering point 8, speed = 14095.3272942
currSpeed < 81979, retaining index 8 in existing quality segment
while considering point 9, speed = 14682.4165026
currSpeed < 81979, retaining index 9 in existing quality segment
while considering point 10, speed = 19165.6250991
currSpeed < 81979, retaining index 10 in existing quality segment
while considering point 11, speed = 3949.0168767
currSpeed < 81979, retaining index 11 in existing quality segment
while considering point 12, speed = 95603.8467501
currSpeed > 81979, starting new quality segment at index 12
while considering point 13, speed = 273955.752383
currSpeed > 81979, starting new quality segment at index 13
while considering point 14, speed = 14730.1201174
currSpeed < 81979, retaining index 14 in existing quality segment
while considering point 15, speed = 21463.3598652
currSpeed < 81979, retaining index 15 in existing quality segment
while considering point 16, speed = 5151.07635886
currSpeed < 81979, retaining index 16 in existing quality segment
Number of quality segments is 4
Considering segments [] and [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
Considering segments [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] and [12]
About to compare curr_segment duration 0.0 with last segment duration 313.0
curr segment [12] is shorter, cut it
Comparing distance 6405.45773225 with speed 81979.285945 * time 67.0 = 5492612.15832
Considering segments [12] and [13, 14, 15, 16]
About to compare curr_segment duration 127.0 with last segment duration 0.0
prev segment [12] is shorter, cut it
Comparing distance 8259.27716888 with speed 81979.285945 * time 153.0 = 12542830.7496
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:while considering point AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 102051.202075
DEBUG:root:currSpeed < 248170.069837, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})(2), prev_pt (AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})) speed = 14981.4125929
DEBUG:root:currSpeed < 248170.069837, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})(3), prev_pt (AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})) speed = 313.046615333
DEBUG:root:currSpeed < 248170.069837, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})(4), prev_pt (AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})) speed = 123.943165016
DEBUG:root:currSpeed < 248170.069837, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})(5), prev_pt (AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})) speed = 1968.73847641
DEBUG:root:currSpeed < 248170.069837, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})(6), prev_pt (AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})) speed = 27951.0481792
DEBUG:root:currSpeed < 248170.069837, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})(7), prev_pt (AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})) speed = 712.612180782
DEBUG:root:currSpeed < 248170.069837, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})(8), prev_pt (AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})) speed = 14095.3272942
DEBUG:root:currSpeed < 248170.069837, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})(9), prev_pt (AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})) speed = 14682.4165026
DEBUG:root:currSpeed < 248170.069837, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})(10), prev_pt (AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})) speed = 19165.6250991
DEBUG:root:currSpeed < 248170.069837, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})(11), prev_pt (AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})) speed = 3949.0168767
DEBUG:root:currSpeed < 248170.069837, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})(12), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 95603.8467501
DEBUG:root:currSpeed < 248170.069837, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})(13), prev_pt (AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})) speed = 273955.752383
DEBUG:root:currSpeed > 248170.069837, removing index 13
DEBUG:root:while considering point AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})(14), prev_pt (AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})) speed = 126394.677754
DEBUG:root:currSpeed < 248170.069837, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})(15), prev_pt (AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})) speed = 21463.3598652
DEBUG:root:currSpeed < 248170.069837, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 5151.0763588560403, u'mLongitude': -121.9436018, u'mLatitude': 37.285262600000003, u'mTime': 1425313353.0})(16), prev_pt (AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})) speed = 5151.07635886
DEBUG:root:currSpeed < 248170.069837, retaining index 16
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16]
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
while considering point 1, speed = 102051.202075
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
currSpeed < 248170, retaining index 1 in existing quality segment
while considering point 2, speed = 14981.4125929
currSpeed < 248170, retaining index 2 in existing quality segment
while considering point 3, speed = 313.046615333
currSpeed < 248170, retaining index 3 in existing quality segment
while considering point 4, speed = 123.943165016
currSpeed < 248170, retaining index 4 in existing quality segment
while considering point 5, speed = 1968.73847641
currSpeed < 248170, retaining index 5 in existing quality segment
while considering point 6, speed = 27951.0481792
currSpeed < 248170, retaining index 6 in existing quality segment
while considering point 7, speed = 712.612180782
currSpeed < 248170, retaining index 7 in existing quality segment
while considering point 8, speed = 14095.3272942
currSpeed < 248170, retaining index 8 in existing quality segment
while considering point 9, speed = 14682.4165026
currSpeed < 248170, retaining index 9 in existing quality segment
while considering point 10, speed = 19165.6250991
currSpeed < 248170, retaining index 10 in existing quality segment
while considering point 11, speed = 3949.0168767
currSpeed < 248170, retaining index 11 in existing quality segment
while considering point 12, speed = 95603.8467501
currSpeed < 248170, retaining index 12 in existing quality segment
while considering point 13, speed = 273955.752383
currSpeed > 248170, starting new quality segment at index 13
while considering point 14, speed = 14730.1201174
currSpeed < 248170, retaining index 14 in existing quality segment
while considering point 15, speed = 21463.3598652
currSpeed < 248170, retaining index 15 in existing quality segment
while considering point 16, speed = 5151.07635886
currSpeed < 248170, retaining index 16 in existing quality segment
Number of quality segments is 2
Considering segments [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] and [13, 14, 15, 16]
About to compare curr_segment duration 127.0 with last segment duration 380.0
curr segment [13, 14, 15, 16] is shorter, cut it
Comparing distance 7122.84956196 with speed 248170.069837 * time 26.0 = 6452421.81576
Comparing distance 7583.68066524 with speed 248170.069837 * time 60.0 = 14890204.1902
Comparing distance 7904.40278189 with speed 248170.069837 * time 83.0 = 20598115.7965
Comparing distance 8259.27716888 with speed 248170.069837 * time 153.0 = 37970020.685
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1425312783.0}}, {'data.mTime': {'$lt': 1425313388.0}}], 'user_id': u'20150302T081303-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
DEBUG:root:Found 3 potential outliers, list = [ 1 12 13]
DEBUG:root:Found 2 clusters with centers [[ 1]
[13]]
DEBUG:root:Considering candidate cluster center [1]
DEBUG:root:lowRange = max(-4, 0) = 0 and highRange = max(6, 17) = 6
DEBUG:root:Considering candidate cluster center [13]
DEBUG:root:lowRange = max(8, 0) = 8 and highRange = max(18, 17) = 17
DEBUG:root:Area size = 7, index = Int64Index([0, 1, 2, 3, 4, 5, 6], dtype='int64') with size 7
DEBUG:root:In area 0 - 6, deleted 2 points through ransac filtering
DEBUG:root:Retain mask is of size 7
DEBUG:root:Area size = 9, index = Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16], dtype='int64') with size 9
DEBUG:root:In area 8 - 16, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:with speed df shape is (17, 9), ransac_mask size = 17
DEBUG:root:filtering done, ransac deleted points = [0]
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
DEBUG:root:while considering point AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 102051.202075
DEBUG:root:currSpeed > 81979.285945, removing index 1
DEBUG:root:while considering point AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})(2), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 41493.023892
DEBUG:root:currSpeed < 81979.285945, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})(3), prev_pt (AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})) speed = 313.046615333
DEBUG:root:currSpeed < 81979.285945, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})(4), prev_pt (AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})) speed = 123.943165016
DEBUG:root:currSpeed < 81979.285945, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})(5), prev_pt (AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})) speed = 1968.73847641
DEBUG:root:currSpeed < 81979.285945, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})(6), prev_pt (AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})) speed = 27951.0481792
DEBUG:root:currSpeed < 81979.285945, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})(7), prev_pt (AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})) speed = 712.612180782
DEBUG:root:currSpeed < 81979.285945, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})(8), prev_pt (AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})) speed = 14095.3272942
DEBUG:root:currSpeed < 81979.285945, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})(9), prev_pt (AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})) speed = 14682.4165026
DEBUG:root:currSpeed < 81979.285945, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})(10), prev_pt (AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})) speed = 19165.6250991
DEBUG:root:currSpeed < 81979.285945, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})(11), prev_pt (AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})) speed = 3949.0168767
DEBUG:root:currSpeed < 81979.285945, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})(12), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 95603.8467501
DEBUG:root:currSpeed > 81979.285945, removing index 12
DEBUG:root:while considering point AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})(13), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 8047.59417975
DEBUG:root:currSpeed < 81979.285945, retaining index 13
DEBUG:root:while considering point AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})(14), prev_pt (AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})) speed = 14730.1201174
DEBUG:root:currSpeed < 81979.285945, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})(15), prev_pt (AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})) speed = 21463.3598652
DEBUG:root:currSpeed < 81979.285945, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 5151.0763588560403, u'mLongitude': -121.9436018, u'mLatitude': 37.285262600000003, u'mTime': 1425313353.0})(16), prev_pt (AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})) speed = 5151.07635886
DEBUG:root:currSpeed < 81979.285945, retaining index 16
INFO:root:Filtering complete, removed indices = [ 0 2 3 4 5 6 7 8 9 10 11 13 14 15 16]
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
INFO:root:len(last_segment) = 0, len(curr_segment) = 11, skipping
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
DEBUG:root:Found 1 potential outliers, list = [13]
DEBUG:root:Only one candidate, cluster centers are [array([13])]
DEBUG:root:Considering candidate cluster center [13]
DEBUG:root:lowRange = max(8, 0) = 8 and highRange = max(18, 17) = 17
DEBUG:root:Area size = 9, index = Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16], dtype='int64') with size 9
DEBUG:root:In area 8 - 16, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:with speed df shape is (17, 9), ransac_mask size = 17
DEBUG:root:filtering done, ransac deleted points = [0]
filtered list size went from (23, 8) to (17, 8)
while considering point 1, speed = 102051.202075
currSpeed > 81979, starting new quality segment at index 1
while considering point 2, speed = 14981.4125929
currSpeed < 81979, retaining index 2 in existing quality segment
while considering point 3, speed = 313.046615333
currSpeed < 81979, retaining index 3 in existing quality segment
while considering point 4, speed = 123.943165016
currSpeed < 81979, retaining index 4 in existing quality segment
while considering point 5, speed = 1968.73847641
currSpeed < 81979, retaining index 5 in existing quality segment
while considering point 6, speed = 27951.0481792
currSpeed < 81979, retaining index 6 in existing quality segment
while considering point 7, speed = 712.612180782
currSpeed < 81979, retaining index 7 in existing quality segment
while considering point 8, speed = 14095.3272942
currSpeed < 81979, retaining index 8 in existing quality segment
while considering point 9, speed = 14682.4165026
currSpeed < 81979, retaining index 9 in existing quality segment
while considering point 10, speed = 19165.6250991
currSpeed < 81979, retaining index 10 in existing quality segment
while considering point 11, speed = 3949.0168767
currSpeed < 81979, retaining index 11 in existing quality segment
while considering point 12, speed = 95603.8467501
currSpeed > 81979, starting new quality segment at index 12
while considering point 13, speed = 273955.752383
currSpeed > 81979, starting new quality segment at index 13
while considering point 14, speed = 14730.1201174
currSpeed < 81979, retaining index 14 in existing quality segment
while considering point 15, speed = 21463.3598652
currSpeed < 81979, retaining index 15 in existing quality segment
while considering point 16, speed = 5151.07635886
currSpeed < 81979, retaining index 16 in existing quality segment
Number of quality segments is 4
Considering segments [] and [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
Considering segments [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] and [12]
About to compare curr_segment duration 0.0 with last segment duration 313.0
curr segment [12] is shorter, cut it
Comparing distance 6405.45773225 with speed 81979.285945 * time 67.0 = 5492612.15832
Considering segments [12] and [13, 14, 15, 16]
About to compare curr_segment duration 127.0 with last segment duration 0.0
prev segment [12] is shorter, cut it
Comparing distance 8259.27716888 with speed 81979.285945 * time 153.0 = 12542830.7496
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:while considering point AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 102051.202075
DEBUG:root:currSpeed < 248170.069837, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})(2), prev_pt (AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})) speed = 14981.4125929
DEBUG:root:currSpeed < 248170.069837, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})(3), prev_pt (AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})) speed = 313.046615333
DEBUG:root:currSpeed < 248170.069837, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})(4), prev_pt (AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})) speed = 123.943165016
DEBUG:root:currSpeed < 248170.069837, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})(5), prev_pt (AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})) speed = 1968.73847641
DEBUG:root:currSpeed < 248170.069837, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})(6), prev_pt (AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})) speed = 27951.0481792
DEBUG:root:currSpeed < 248170.069837, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})(7), prev_pt (AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})) speed = 712.612180782
DEBUG:root:currSpeed < 248170.069837, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})(8), prev_pt (AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})) speed = 14095.3272942
DEBUG:root:currSpeed < 248170.069837, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})(9), prev_pt (AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})) speed = 14682.4165026
DEBUG:root:currSpeed < 248170.069837, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})(10), prev_pt (AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})) speed = 19165.6250991
DEBUG:root:currSpeed < 248170.069837, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})(11), prev_pt (AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})) speed = 3949.0168767
DEBUG:root:currSpeed < 248170.069837, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})(12), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 95603.8467501
DEBUG:root:currSpeed < 248170.069837, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})(13), prev_pt (AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})) speed = 273955.752383
DEBUG:root:currSpeed > 248170.069837, removing index 13
DEBUG:root:while considering point AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})(14), prev_pt (AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})) speed = 126394.677754
DEBUG:root:currSpeed < 248170.069837, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})(15), prev_pt (AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})) speed = 21463.3598652
DEBUG:root:currSpeed < 248170.069837, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 5151.0763588560403, u'mLongitude': -121.9436018, u'mLatitude': 37.285262600000003, u'mTime': 1425313353.0})(16), prev_pt (AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})) speed = 5151.07635886
DEBUG:root:currSpeed < 248170.069837, retaining index 16
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16]
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
while considering point 1, speed = 102051.202075
currSpeed < 248170, retaining index 1 in existing quality segment
while considering point 2, speed = 14981.4125929
currSpeed < 248170, retaining index 2 in existing quality segment
while considering point 3, speed = 313.046615333
currSpeed < 248170, retaining index 3 in existing quality segment
while considering point 4, speed = 123.943165016
currSpeed < 248170, retaining index 4 in existing quality segment
while considering point 5, speed = 1968.73847641
currSpeed < 248170, retaining index 5 in existing quality segment
while considering point 6, speed = 27951.0481792
currSpeed < 248170, retaining index 6 in existing quality segment
while considering point 7, speed = 712.612180782
currSpeed < 248170, retaining index 7 in existing quality segment
while considering point 8, speed = 14095.3272942
currSpeed < 248170, retaining index 8 in existing quality segment
while considering point 9, speed = 14682.4165026
currSpeed < 248170, retaining index 9 in existing quality segment
while considering point 10, speed = 19165.6250991
currSpeed < 248170, retaining index 10 in existing quality segment
while considering point 11, speed = 3949.0168767
currSpeed < 248170, retaining index 11 in existing quality segment
while considering point 12, speed = 95603.8467501
currSpeed < 248170, retaining index 12 in existing quality segment
while considering point 13, speed = 273955.752383
currSpeed > 248170, starting new quality segment at index 13
while considering point 14, speed = 14730.1201174
currSpeed < 248170, retaining index 14 in existing quality segment
while considering point 15, speed = 21463.3598652
currSpeed < 248170, retaining index 15 in existing quality segment
while considering point 16, speed = 5151.07635886
currSpeed < 248170, retaining index 16 in existing quality segment
Number of quality segments is 2
Considering segments [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] and [13, 14, 15, 16]
About to compare curr_segment duration 127.0 with last segment duration 380.0
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
curr segment [13, 14, 15, 16] is shorter, cut it
Comparing distance 7122.84956196 with speed 248170.069837 * time 26.0 = 6452421.81576
Comparing distance 7583.68066524 with speed 248170.069837 * time 60.0 = 14890204.1902
Comparing distance 7904.40278189 with speed 248170.069837 * time 83.0 = 20598115.7965
Comparing distance 8259.27716888 with speed 248170.069837 * time 153.0 = 37970020.685
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1425312783.0}}, {'data.mTime': {'$lt': 1425313388.0}}], 'user_id': u'20150302T081303-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
DEBUG:root:Found 3 potential outliers, list = [ 1 12 13]
DEBUG:root:Found 2 clusters with centers [[ 1]
[13]]
DEBUG:root:Considering candidate cluster center [1]
DEBUG:root:lowRange = max(-4, 0) = 0 and highRange = max(6, 17) = 6
DEBUG:root:Considering candidate cluster center [13]
DEBUG:root:lowRange = max(8, 0) = 8 and highRange = max(18, 17) = 17
DEBUG:root:Area size = 7, index = Int64Index([0, 1, 2, 3, 4, 5, 6], dtype='int64') with size 7
DEBUG:root:In area 0 - 6, deleted 2 points through ransac filtering
DEBUG:root:Retain mask is of size 7
DEBUG:root:Area size = 9, index = Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16], dtype='int64') with size 9
DEBUG:root:In area 8 - 16, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:with speed df shape is (17, 9), ransac_mask size = 17
DEBUG:root:filtering done, ransac deleted points = [0]
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
DEBUG:root:while considering point AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 102051.202075
DEBUG:root:currSpeed > 81979.285945, removing index 1
DEBUG:root:while considering point AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})(2), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 41493.023892
DEBUG:root:currSpeed < 81979.285945, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})(3), prev_pt (AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})) speed = 313.046615333
DEBUG:root:currSpeed < 81979.285945, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})(4), prev_pt (AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})) speed = 123.943165016
DEBUG:root:currSpeed < 81979.285945, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})(5), prev_pt (AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})) speed = 1968.73847641
DEBUG:root:currSpeed < 81979.285945, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})(6), prev_pt (AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})) speed = 27951.0481792
DEBUG:root:currSpeed < 81979.285945, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})(7), prev_pt (AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})) speed = 712.612180782
DEBUG:root:currSpeed < 81979.285945, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})(8), prev_pt (AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})) speed = 14095.3272942
DEBUG:root:currSpeed < 81979.285945, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})(9), prev_pt (AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})) speed = 14682.4165026
DEBUG:root:currSpeed < 81979.285945, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})(10), prev_pt (AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})) speed = 19165.6250991
DEBUG:root:currSpeed < 81979.285945, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})(11), prev_pt (AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})) speed = 3949.0168767
DEBUG:root:currSpeed < 81979.285945, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})(12), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 95603.8467501
DEBUG:root:currSpeed > 81979.285945, removing index 12
DEBUG:root:while considering point AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})(13), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 8047.59417975
DEBUG:root:currSpeed < 81979.285945, retaining index 13
DEBUG:root:while considering point AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})(14), prev_pt (AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})) speed = 14730.1201174
DEBUG:root:currSpeed < 81979.285945, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})(15), prev_pt (AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})) speed = 21463.3598652
DEBUG:root:currSpeed < 81979.285945, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 5151.0763588560403, u'mLongitude': -121.9436018, u'mLatitude': 37.285262600000003, u'mTime': 1425313353.0})(16), prev_pt (AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})) speed = 5151.07635886
DEBUG:root:currSpeed < 81979.285945, retaining index 16
INFO:root:Filtering complete, removed indices = [ 0 2 3 4 5 6 7 8 9 10 11 13 14 15 16]
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
while considering point 1, speed = 102051.202075
INFO:root:len(last_segment) = 0, len(curr_segment) = 11, skipping
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
DEBUG:root:Found 1 potential outliers, list = [13]
DEBUG:root:Only one candidate, cluster centers are [array([13])]
DEBUG:root:Considering candidate cluster center [13]
DEBUG:root:lowRange = max(8, 0) = 8 and highRange = max(18, 17) = 17
DEBUG:root:Area size = 9, index = Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16], dtype='int64') with size 9
DEBUG:root:In area 8 - 16, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:with speed df shape is (17, 9), ransac_mask size = 17
DEBUG:root:filtering done, ransac deleted points = [0]
currSpeed > 81979, starting new quality segment at index 1
while considering point 2, speed = 14981.4125929
currSpeed < 81979, retaining index 2 in existing quality segment
while considering point 3, speed = 313.046615333
currSpeed < 81979, retaining index 3 in existing quality segment
while considering point 4, speed = 123.943165016
currSpeed < 81979, retaining index 4 in existing quality segment
while considering point 5, speed = 1968.73847641
currSpeed < 81979, retaining index 5 in existing quality segment
while considering point 6, speed = 27951.0481792
currSpeed < 81979, retaining index 6 in existing quality segment
while considering point 7, speed = 712.612180782
currSpeed < 81979, retaining index 7 in existing quality segment
while considering point 8, speed = 14095.3272942
currSpeed < 81979, retaining index 8 in existing quality segment
while considering point 9, speed = 14682.4165026
currSpeed < 81979, retaining index 9 in existing quality segment
while considering point 10, speed = 19165.6250991
currSpeed < 81979, retaining index 10 in existing quality segment
while considering point 11, speed = 3949.0168767
currSpeed < 81979, retaining index 11 in existing quality segment
while considering point 12, speed = 95603.8467501
currSpeed > 81979, starting new quality segment at index 12
while considering point 13, speed = 273955.752383
currSpeed > 81979, starting new quality segment at index 13
while considering point 14, speed = 14730.1201174
currSpeed < 81979, retaining index 14 in existing quality segment
while considering point 15, speed = 21463.3598652
currSpeed < 81979, retaining index 15 in existing quality segment
while considering point 16, speed = 5151.07635886
currSpeed < 81979, retaining index 16 in existing quality segment
Number of quality segments is 4
Considering segments [] and [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
Considering segments [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] and [12]
About to compare curr_segment duration 0.0 with last segment duration 313.0
curr segment [12] is shorter, cut it
Comparing distance 6405.45773225 with speed 81979.285945 * time 67.0 = 5492612.15832
Considering segments [12] and [13, 14, 15, 16]
About to compare curr_segment duration 127.0 with last segment duration 0.0
prev segment [12] is shorter, cut it
Comparing distance 8259.27716888 with speed 81979.285945 * time 153.0 = 12542830.7496
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:while considering point AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 102051.202075
DEBUG:root:currSpeed < 248170.069837, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})(2), prev_pt (AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})) speed = 14981.4125929
DEBUG:root:currSpeed < 248170.069837, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})(3), prev_pt (AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})) speed = 313.046615333
DEBUG:root:currSpeed < 248170.069837, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})(4), prev_pt (AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})) speed = 123.943165016
DEBUG:root:currSpeed < 248170.069837, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})(5), prev_pt (AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})) speed = 1968.73847641
DEBUG:root:currSpeed < 248170.069837, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})(6), prev_pt (AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})) speed = 27951.0481792
DEBUG:root:currSpeed < 248170.069837, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})(7), prev_pt (AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})) speed = 712.612180782
DEBUG:root:currSpeed < 248170.069837, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})(8), prev_pt (AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})) speed = 14095.3272942
DEBUG:root:currSpeed < 248170.069837, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})(9), prev_pt (AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})) speed = 14682.4165026
DEBUG:root:currSpeed < 248170.069837, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})(10), prev_pt (AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})) speed = 19165.6250991
DEBUG:root:currSpeed < 248170.069837, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})(11), prev_pt (AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})) speed = 3949.0168767
DEBUG:root:currSpeed < 248170.069837, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})(12), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 95603.8467501
DEBUG:root:currSpeed < 248170.069837, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})(13), prev_pt (AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})) speed = 273955.752383
DEBUG:root:currSpeed > 248170.069837, removing index 13
DEBUG:root:while considering point AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})(14), prev_pt (AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})) speed = 126394.677754
DEBUG:root:currSpeed < 248170.069837, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})(15), prev_pt (AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})) speed = 21463.3598652
DEBUG:root:currSpeed < 248170.069837, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 5151.0763588560403, u'mLongitude': -121.9436018, u'mLatitude': 37.285262600000003, u'mTime': 1425313353.0})(16), prev_pt (AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})) speed = 5151.07635886
DEBUG:root:currSpeed < 248170.069837, retaining index 16
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16]
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
while considering point 1, speed = 102051.202075
currSpeed < 248170, retaining index 1 in existing quality segment
while considering point 2, speed = 14981.4125929
currSpeed < 248170, retaining index 2 in existing quality segment
while considering point 3, speed = 313.046615333
currSpeed < 248170, retaining index 3 in existing quality segment
while considering point 4, speed = 123.943165016
currSpeed < 248170, retaining index 4 in existing quality segment
while considering point 5, speed = 1968.73847641
currSpeed < 248170, retaining index 5 in existing quality segment
while considering point 6, speed = 27951.0481792
currSpeed < 248170, retaining index 6 in existing quality segment
while considering point 7, speed = 712.612180782
currSpeed < 248170, retaining index 7 in existing quality segment
while considering point 8, speed = 14095.3272942
currSpeed < 248170, retaining index 8 in existing quality segment
while considering point 9, speed = 14682.4165026
currSpeed < 248170, retaining index 9 in existing quality segment
while considering point 10, speed = 19165.6250991
currSpeed < 248170, retaining index 10 in existing quality segment
while considering point 11, speed = 3949.0168767
currSpeed < 248170, retaining index 11 in existing quality segment
while considering point 12, speed = 95603.8467501
currSpeed < 248170, retaining index 12 in existing quality segment
while considering point 13, speed = 273955.752383
currSpeed > 248170, starting new quality segment at index 13
while considering point 14, speed = 14730.1201174
currSpeed < 248170, retaining index 14 in existing quality segment
while considering point 15, speed = 21463.3598652
currSpeed < 248170, retaining index 15 in existing quality segment
while considering point 16, speed = 5151.07635886
currSpeed < 248170, retaining index 16 in existing quality segment
Number of quality segments is 2
Considering segments [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] and [13, 14, 15, 16]
About to compare curr_segment duration 127.0 with last segment duration 380.0
curr segment [13, 14, 15, 16] is shorter, cut it
Comparing distance 7122.84956196 with speed 248170.069837 * time 26.0 = 6452421.81576
Comparing distance 7583.68066524 with speed 248170.069837 * time 60.0 = 14890204.1902
Comparing distance 7904.40278189 with speed 248170.069837 * time 83.0 = 20598115.7965
Comparing distance 8259.27716888 with speed 248170.069837 * time 153.0 = 37970020.685
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1425312783.0}}, {'data.mTime': {'$lt': 1425313388.0}}], 'user_id': u'20150302T081303-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
DEBUG:root:Found 3 potential outliers, list = [ 1 12 13]
DEBUG:root:Found 2 clusters with centers [[ 1]
[13]]
DEBUG:root:Considering candidate cluster center [1]
DEBUG:root:lowRange = max(-4, 0) = 0 and highRange = max(6, 17) = 6
DEBUG:root:Considering candidate cluster center [13]
DEBUG:root:lowRange = max(8, 0) = 8 and highRange = max(18, 17) = 17
DEBUG:root:Area size = 7, index = Int64Index([0, 1, 2, 3, 4, 5, 6], dtype='int64') with size 7
DEBUG:root:In area 0 - 6, deleted 2 points through ransac filtering
DEBUG:root:Retain mask is of size 7
DEBUG:root:Area size = 9, index = Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16], dtype='int64') with size 9
DEBUG:root:In area 8 - 16, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:with speed df shape is (17, 9), ransac_mask size = 17
DEBUG:root:filtering done, ransac deleted points = [0]
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
DEBUG:root:while considering point AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 102051.202075
DEBUG:root:currSpeed > 81979.285945, removing index 1
DEBUG:root:while considering point AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})(2), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 41493.023892
DEBUG:root:currSpeed < 81979.285945, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})(3), prev_pt (AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})) speed = 313.046615333
DEBUG:root:currSpeed < 81979.285945, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})(4), prev_pt (AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})) speed = 123.943165016
DEBUG:root:currSpeed < 81979.285945, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})(5), prev_pt (AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})) speed = 1968.73847641
DEBUG:root:currSpeed < 81979.285945, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})(6), prev_pt (AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})) speed = 27951.0481792
DEBUG:root:currSpeed < 81979.285945, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})(7), prev_pt (AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})) speed = 712.612180782
DEBUG:root:currSpeed < 81979.285945, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})(8), prev_pt (AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})) speed = 14095.3272942
DEBUG:root:currSpeed < 81979.285945, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})(9), prev_pt (AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})) speed = 14682.4165026
DEBUG:root:currSpeed < 81979.285945, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})(10), prev_pt (AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})) speed = 19165.6250991
DEBUG:root:currSpeed < 81979.285945, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})(11), prev_pt (AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})) speed = 3949.0168767
DEBUG:root:currSpeed < 81979.285945, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})(12), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 95603.8467501
DEBUG:root:currSpeed > 81979.285945, removing index 12
DEBUG:root:while considering point AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})(13), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 8047.59417975
DEBUG:root:currSpeed < 81979.285945, retaining index 13
DEBUG:root:while considering point AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})(14), prev_pt (AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})) speed = 14730.1201174
DEBUG:root:currSpeed < 81979.285945, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})(15), prev_pt (AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})) speed = 21463.3598652
DEBUG:root:currSpeed < 81979.285945, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 5151.0763588560403, u'mLongitude': -121.9436018, u'mLatitude': 37.285262600000003, u'mTime': 1425313353.0})(16), prev_pt (AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})) speed = 5151.07635886
DEBUG:root:currSpeed < 81979.285945, retaining index 16
INFO:root:Filtering complete, removed indices = [ 0 2 3 4 5 6 7 8 9 10 11 13 14 15 16]
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
while considering point 1, speed = 102051.202075
INFO:root:len(last_segment) = 0, len(curr_segment) = 11, skipping
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
DEBUG:root:Found 1 potential outliers, list = [13]
DEBUG:root:Only one candidate, cluster centers are [array([13])]
DEBUG:root:Considering candidate cluster center [13]
DEBUG:root:lowRange = max(8, 0) = 8 and highRange = max(18, 17) = 17
DEBUG:root:Area size = 9, index = Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16], dtype='int64') with size 9
DEBUG:root:In area 8 - 16, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:with speed df shape is (17, 9), ransac_mask size = 17
DEBUG:root:filtering done, ransac deleted points = [0]
DEBUG:root:while considering point AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 102051.202075
DEBUG:root:currSpeed < 248170.069837, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})(2), prev_pt (AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})) speed = 14981.4125929
DEBUG:root:currSpeed < 248170.069837, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})(3), prev_pt (AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})) speed = 313.046615333
DEBUG:root:currSpeed < 248170.069837, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})(4), prev_pt (AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})) speed = 123.943165016
DEBUG:root:currSpeed < 248170.069837, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})(5), prev_pt (AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})) speed = 1968.73847641
DEBUG:root:currSpeed < 248170.069837, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})(6), prev_pt (AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})) speed = 27951.0481792
DEBUG:root:currSpeed < 248170.069837, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})(7), prev_pt (AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})) speed = 712.612180782
DEBUG:root:currSpeed < 248170.069837, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})(8), prev_pt (AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})) speed = 14095.3272942
DEBUG:root:currSpeed < 248170.069837, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})(9), prev_pt (AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})) speed = 14682.4165026
DEBUG:root:currSpeed < 248170.069837, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})(10), prev_pt (AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})) speed = 19165.6250991
DEBUG:root:currSpeed < 248170.069837, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})(11), prev_pt (AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})) speed = 3949.0168767
DEBUG:root:currSpeed < 248170.069837, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})(12), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 95603.8467501
DEBUG:root:currSpeed < 248170.069837, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})(13), prev_pt (AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})) speed = 273955.752383
DEBUG:root:currSpeed > 248170.069837, removing index 13
DEBUG:root:while considering point AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})(14), prev_pt (AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})) speed = 126394.677754
DEBUG:root:currSpeed < 248170.069837, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})(15), prev_pt (AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})) speed = 21463.3598652
DEBUG:root:currSpeed < 248170.069837, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 5151.0763588560403, u'mLongitude': -121.9436018, u'mLatitude': 37.285262600000003, u'mTime': 1425313353.0})(16), prev_pt (AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})) speed = 5151.07635886
DEBUG:root:currSpeed < 248170.069837, retaining index 16
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16]
currSpeed > 81979, starting new quality segment at index 1
while considering point 2, speed = 14981.4125929
currSpeed < 81979, retaining index 2 in existing quality segment
while considering point 3, speed = 313.046615333
currSpeed < 81979, retaining index 3 in existing quality segment
while considering point 4, speed = 123.943165016
currSpeed < 81979, retaining index 4 in existing quality segment
while considering point 5, speed = 1968.73847641
currSpeed < 81979, retaining index 5 in existing quality segment
while considering point 6, speed = 27951.0481792
currSpeed < 81979, retaining index 6 in existing quality segment
while considering point 7, speed = 712.612180782
currSpeed < 81979, retaining index 7 in existing quality segment
while considering point 8, speed = 14095.3272942
currSpeed < 81979, retaining index 8 in existing quality segment
while considering point 9, speed = 14682.4165026
currSpeed < 81979, retaining index 9 in existing quality segment
while considering point 10, speed = 19165.6250991
currSpeed < 81979, retaining index 10 in existing quality segment
while considering point 11, speed = 3949.0168767
currSpeed < 81979, retaining index 11 in existing quality segment
while considering point 12, speed = 95603.8467501
currSpeed > 81979, starting new quality segment at index 12
while considering point 13, speed = 273955.752383
currSpeed > 81979, starting new quality segment at index 13
while considering point 14, speed = 14730.1201174
currSpeed < 81979, retaining index 14 in existing quality segment
while considering point 15, speed = 21463.3598652
currSpeed < 81979, retaining index 15 in existing quality segment
while considering point 16, speed = 5151.07635886
currSpeed < 81979, retaining index 16 in existing quality segment
Number of quality segments is 4
Considering segments [] and [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
Considering segments [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] and [12]
About to compare curr_segment duration 0.0 with last segment duration 313.0
curr segment [12] is shorter, cut it
Comparing distance 6405.45773225 with speed 81979.285945 * time 67.0 = 5492612.15832
Considering segments [12] and [13, 14, 15, 16]
About to compare curr_segment duration 127.0 with last segment duration 0.0
prev segment [12] is shorter, cut it
Comparing distance 8259.27716888 with speed 81979.285945 * time 153.0 = 12542830.7496
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
filtered list size went from (23, 8) to (17, 8)
while considering point 1, speed = 102051.202075
currSpeed < 248170, retaining index 1 in existing quality segment
while considering point 2, speed = 14981.4125929
currSpeed < 248170, retaining index 2 in existing quality segment
while considering point 3, speed = 313.046615333
currSpeed < 248170, retaining index 3 in existing quality segment
while considering point 4, speed = 123.943165016
currSpeed < 248170, retaining index 4 in existing quality segment
while considering point 5, speed = 1968.73847641
currSpeed < 248170, retaining index 5 in existing quality segment
while considering point 6, speed = 27951.0481792
currSpeed < 248170, retaining index 6 in existing quality segment
while considering point 7, speed = 712.612180782
currSpeed < 248170, retaining index 7 in existing quality segment
while considering point 8, speed = 14095.3272942
currSpeed < 248170, retaining index 8 in existing quality segment
while considering point 9, speed = 14682.4165026
currSpeed < 248170, retaining index 9 in existing quality segment
while considering point 10, speed = 19165.6250991
currSpeed < 248170, retaining index 10 in existing quality segment
while considering point 11, speed = 3949.0168767
currSpeed < 248170, retaining index 11 in existing quality segment
while considering point 12, speed = 95603.8467501
currSpeed < 248170, retaining index 12 in existing quality segment
while considering point 13, speed = 273955.752383
currSpeed > 248170, starting new quality segment at index 13
while considering point 14, speed = 14730.1201174
currSpeed < 248170, retaining index 14 in existing quality segment
while considering point 15, speed = 21463.3598652
currSpeed < 248170, retaining index 15 in existing quality segment
while considering point 16, speed = 5151.07635886
currSpeed < 248170, retaining index 16 in existing quality segment
Number of quality segments is 2
Considering segments [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] and [13, 14, 15, 16]
About to compare curr_segment duration 127.0 with last segment duration 380.0
curr segment [13, 14, 15, 16] is shorter, cut it
Comparing distance 7122.84956196 with speed 248170.069837 * time 26.0 = 6452421.81576
Comparing distance 7583.68066524 with speed 248170.069837 * time 60.0 = 14890204.1902
Comparing distance 7904.40278189 with speed 248170.069837 * time 83.0 = 20598115.7965
Comparing distance 8259.27716888 with speed 248170.069837 * time 153.0 = 37970020.685
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1425312783.0}}, {'data.mTime': {'$lt': 1425313388.0}}], 'user_id': u'20150302T081303-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
DEBUG:root:Found 3 potential outliers, list = [ 1 12 13]
DEBUG:root:Found 2 clusters with centers [[ 1]
[13]]
DEBUG:root:Considering candidate cluster center [1]
DEBUG:root:lowRange = max(-4, 0) = 0 and highRange = max(6, 17) = 6
DEBUG:root:Considering candidate cluster center [13]
DEBUG:root:lowRange = max(8, 0) = 8 and highRange = max(18, 17) = 17
DEBUG:root:Area size = 7, index = Int64Index([0, 1, 2, 3, 4, 5, 6], dtype='int64') with size 7
DEBUG:root:In area 0 - 6, deleted 2 points through ransac filtering
DEBUG:root:Retain mask is of size 7
DEBUG:root:Area size = 9, index = Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16], dtype='int64') with size 9
DEBUG:root:In area 8 - 16, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:with speed df shape is (17, 9), ransac_mask size = 17
DEBUG:root:filtering done, ransac deleted points = [0]
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
DEBUG:root:while considering point AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 102051.202075
DEBUG:root:currSpeed > 81979.285945, removing index 1
DEBUG:root:while considering point AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})(2), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 41493.023892
DEBUG:root:currSpeed < 81979.285945, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})(3), prev_pt (AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})) speed = 313.046615333
DEBUG:root:currSpeed < 81979.285945, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})(4), prev_pt (AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})) speed = 123.943165016
DEBUG:root:currSpeed < 81979.285945, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})(5), prev_pt (AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})) speed = 1968.73847641
DEBUG:root:currSpeed < 81979.285945, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})(6), prev_pt (AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})) speed = 27951.0481792
DEBUG:root:currSpeed < 81979.285945, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})(7), prev_pt (AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})) speed = 712.612180782
DEBUG:root:currSpeed < 81979.285945, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})(8), prev_pt (AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})) speed = 14095.3272942
DEBUG:root:currSpeed < 81979.285945, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})(9), prev_pt (AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})) speed = 14682.4165026
DEBUG:root:currSpeed < 81979.285945, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})(10), prev_pt (AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})) speed = 19165.6250991
DEBUG:root:currSpeed < 81979.285945, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})(11), prev_pt (AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})) speed = 3949.0168767
DEBUG:root:currSpeed < 81979.285945, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})(12), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 95603.8467501
DEBUG:root:currSpeed > 81979.285945, removing index 12
DEBUG:root:while considering point AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})(13), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 8047.59417975
DEBUG:root:currSpeed < 81979.285945, retaining index 13
DEBUG:root:while considering point AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})(14), prev_pt (AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})) speed = 14730.1201174
DEBUG:root:currSpeed < 81979.285945, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})(15), prev_pt (AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})) speed = 21463.3598652
DEBUG:root:currSpeed < 81979.285945, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 5151.0763588560403, u'mLongitude': -121.9436018, u'mLatitude': 37.285262600000003, u'mTime': 1425313353.0})(16), prev_pt (AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})) speed = 5151.07635886
DEBUG:root:currSpeed < 81979.285945, retaining index 16
INFO:root:Filtering complete, removed indices = [ 0 2 3 4 5 6 7 8 9 10 11 13 14 15 16]
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
while considering point 1, speed = 102051.202075
INFO:root:len(last_segment) = 0, len(curr_segment) = 11, skipping
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
DEBUG:root:Found 1 potential outliers, list = [13]
DEBUG:root:Only one candidate, cluster centers are [array([13])]
DEBUG:root:Considering candidate cluster center [13]
DEBUG:root:lowRange = max(8, 0) = 8 and highRange = max(18, 17) = 17
DEBUG:root:Area size = 9, index = Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16], dtype='int64') with size 9
DEBUG:root:In area 8 - 16, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:with speed df shape is (17, 9), ransac_mask size = 17
DEBUG:root:filtering done, ransac deleted points = [0]
currSpeed > 81979, starting new quality segment at index 1
while considering point 2, speed = 14981.4125929
currSpeed < 81979, retaining index 2 in existing quality segment
while considering point 3, speed = 313.046615333
currSpeed < 81979, retaining index 3 in existing quality segment
while considering point 4, speed = 123.943165016
currSpeed < 81979, retaining index 4 in existing quality segment
while considering point 5, speed = 1968.73847641
currSpeed < 81979, retaining index 5 in existing quality segment
while considering point 6, speed = 27951.0481792
currSpeed < 81979, retaining index 6 in existing quality segment
while considering point 7, speed = 712.612180782
currSpeed < 81979, retaining index 7 in existing quality segment
while considering point 8, speed = 14095.3272942
currSpeed < 81979, retaining index 8 in existing quality segment
while considering point 9, speed = 14682.4165026
currSpeed < 81979, retaining index 9 in existing quality segment
while considering point 10, speed = 19165.6250991
currSpeed < 81979, retaining index 10 in existing quality segment
while considering point 11, speed = 3949.0168767
currSpeed < 81979, retaining index 11 in existing quality segment
while considering point 12, speed = 95603.8467501
currSpeed > 81979, starting new quality segment at index 12
while considering point 13, speed = 273955.752383
currSpeed > 81979, starting new quality segment at index 13
while considering point 14, speed = 14730.1201174
currSpeed < 81979, retaining index 14 in existing quality segment
while considering point 15, speed = 21463.3598652
currSpeed < 81979, retaining index 15 in existing quality segment
while considering point 16, speed = 5151.07635886
currSpeed < 81979, retaining index 16 in existing quality segment
Number of quality segments is 4
Considering segments [] and [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
Considering segments [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] and [12]
About to compare curr_segment duration 0.0 with last segment duration 313.0
curr segment [12] is shorter, cut it
Comparing distance 6405.45773225 with speed 81979.285945 * time 67.0 = 5492612.15832
Considering segments [12] and [13, 14, 15, 16]
About to compare curr_segment duration 127.0 with last segment duration 0.0
prev segment [12] is shorter, cut it
Comparing distance 8259.27716888 with speed 81979.285945 * time 153.0 = 12542830.7496
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:while considering point AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 102051.202075
DEBUG:root:currSpeed < 248170.069837, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})(2), prev_pt (AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})) speed = 14981.4125929
DEBUG:root:currSpeed < 248170.069837, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})(3), prev_pt (AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})) speed = 313.046615333
DEBUG:root:currSpeed < 248170.069837, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})(4), prev_pt (AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})) speed = 123.943165016
DEBUG:root:currSpeed < 248170.069837, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})(5), prev_pt (AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})) speed = 1968.73847641
DEBUG:root:currSpeed < 248170.069837, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})(6), prev_pt (AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})) speed = 27951.0481792
DEBUG:root:currSpeed < 248170.069837, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})(7), prev_pt (AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})) speed = 712.612180782
DEBUG:root:currSpeed < 248170.069837, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})(8), prev_pt (AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})) speed = 14095.3272942
DEBUG:root:currSpeed < 248170.069837, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})(9), prev_pt (AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})) speed = 14682.4165026
DEBUG:root:currSpeed < 248170.069837, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})(10), prev_pt (AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})) speed = 19165.6250991
DEBUG:root:currSpeed < 248170.069837, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})(11), prev_pt (AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})) speed = 3949.0168767
DEBUG:root:currSpeed < 248170.069837, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})(12), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 95603.8467501
DEBUG:root:currSpeed < 248170.069837, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})(13), prev_pt (AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})) speed = 273955.752383
DEBUG:root:currSpeed > 248170.069837, removing index 13
DEBUG:root:while considering point AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})(14), prev_pt (AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})) speed = 126394.677754
DEBUG:root:currSpeed < 248170.069837, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})(15), prev_pt (AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})) speed = 21463.3598652
DEBUG:root:currSpeed < 248170.069837, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 5151.0763588560403, u'mLongitude': -121.9436018, u'mLatitude': 37.285262600000003, u'mTime': 1425313353.0})(16), prev_pt (AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})) speed = 5151.07635886
DEBUG:root:currSpeed < 248170.069837, retaining index 16
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16]
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
while considering point 1, speed = 102051.202075
currSpeed < 248170, retaining index 1 in existing quality segment
while considering point 2, speed = 14981.4125929
currSpeed < 248170, retaining index 2 in existing quality segment
while considering point 3, speed = 313.046615333
currSpeed < 248170, retaining index 3 in existing quality segment
while considering point 4, speed = 123.943165016
currSpeed < 248170, retaining index 4 in existing quality segment
while considering point 5, speed = 1968.73847641
currSpeed < 248170, retaining index 5 in existing quality segment
while considering point 6, speed = 27951.0481792
currSpeed < 248170, retaining index 6 in existing quality segment
while considering point 7, speed = 712.612180782
currSpeed < 248170, retaining index 7 in existing quality segment
while considering point 8, speed = 14095.3272942
currSpeed < 248170, retaining index 8 in existing quality segment
while considering point 9, speed = 14682.4165026
currSpeed < 248170, retaining index 9 in existing quality segment
while considering point 10, speed = 19165.6250991
currSpeed < 248170, retaining index 10 in existing quality segment
while considering point 11, speed = 3949.0168767
currSpeed < 248170, retaining index 11 in existing quality segment
while considering point 12, speed = 95603.8467501
currSpeed < 248170, retaining index 12 in existing quality segment
while considering point 13, speed = 273955.752383
currSpeed > 248170, starting new quality segment at index 13
while considering point 14, speed = 14730.1201174
currSpeed < 248170, retaining index 14 in existing quality segment
while considering point 15, speed = 21463.3598652
currSpeed < 248170, retaining index 15 in existing quality segment
while considering point 16, speed = 5151.07635886
currSpeed < 248170, retaining index 16 in existing quality segment
Number of quality segments is 2
Considering segments [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] and [13, 14, 15, 16]
About to compare curr_segment duration 127.0 with last segment duration 380.0
curr segment [13, 14, 15, 16] is shorter, cut it
Comparing distance 7122.84956196 with speed 248170.069837 * time 26.0 = 6452421.81576
Comparing distance 7583.68066524 with speed 248170.069837 * time 60.0 = 14890204.1902
Comparing distance 7904.40278189 with speed 248170.069837 * time 83.0 = 20598115.7965
Comparing distance 8259.27716888 with speed 248170.069837 * time 153.0 = 37970020.685
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1425312783.0}}, {'data.mTime': {'$lt': 1425313388.0}}], 'user_id': u'20150302T081303-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
DEBUG:root:Found 3 potential outliers, list = [ 1 12 13]
DEBUG:root:Found 2 clusters with centers [[ 1]
[13]]
DEBUG:root:Considering candidate cluster center [1]
DEBUG:root:lowRange = max(-4, 0) = 0 and highRange = max(6, 17) = 6
DEBUG:root:Considering candidate cluster center [13]
DEBUG:root:lowRange = max(8, 0) = 8 and highRange = max(18, 17) = 17
DEBUG:root:Area size = 7, index = Int64Index([0, 1, 2, 3, 4, 5, 6], dtype='int64') with size 7
DEBUG:root:In area 0 - 6, deleted 2 points through ransac filtering
DEBUG:root:Retain mask is of size 7
DEBUG:root:Area size = 9, index = Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16], dtype='int64') with size 9
DEBUG:root:In area 8 - 16, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:with speed df shape is (17, 9), ransac_mask size = 17
DEBUG:root:filtering done, ransac deleted points = [0]
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
DEBUG:root:while considering point AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 102051.202075
DEBUG:root:currSpeed > 81979.285945, removing index 1
DEBUG:root:while considering point AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})(2), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 41493.023892
DEBUG:root:currSpeed < 81979.285945, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})(3), prev_pt (AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})) speed = 313.046615333
DEBUG:root:currSpeed < 81979.285945, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})(4), prev_pt (AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})) speed = 123.943165016
DEBUG:root:currSpeed < 81979.285945, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})(5), prev_pt (AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})) speed = 1968.73847641
DEBUG:root:currSpeed < 81979.285945, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})(6), prev_pt (AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})) speed = 27951.0481792
DEBUG:root:currSpeed < 81979.285945, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})(7), prev_pt (AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})) speed = 712.612180782
DEBUG:root:currSpeed < 81979.285945, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})(8), prev_pt (AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})) speed = 14095.3272942
DEBUG:root:currSpeed < 81979.285945, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})(9), prev_pt (AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})) speed = 14682.4165026
DEBUG:root:currSpeed < 81979.285945, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})(10), prev_pt (AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})) speed = 19165.6250991
DEBUG:root:currSpeed < 81979.285945, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})(11), prev_pt (AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})) speed = 3949.0168767
DEBUG:root:currSpeed < 81979.285945, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})(12), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 95603.8467501
DEBUG:root:currSpeed > 81979.285945, removing index 12
DEBUG:root:while considering point AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})(13), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 8047.59417975
DEBUG:root:currSpeed < 81979.285945, retaining index 13
DEBUG:root:while considering point AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})(14), prev_pt (AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})) speed = 14730.1201174
DEBUG:root:currSpeed < 81979.285945, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})(15), prev_pt (AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})) speed = 21463.3598652
DEBUG:root:currSpeed < 81979.285945, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 5151.0763588560403, u'mLongitude': -121.9436018, u'mLatitude': 37.285262600000003, u'mTime': 1425313353.0})(16), prev_pt (AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})) speed = 5151.07635886
DEBUG:root:currSpeed < 81979.285945, retaining index 16
INFO:root:Filtering complete, removed indices = [ 0 2 3 4 5 6 7 8 9 10 11 13 14 15 16]
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
while considering point 1, speed = 102051.202075
INFO:root:len(last_segment) = 0, len(curr_segment) = 11, skipping
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
DEBUG:root:Found 1 potential outliers, list = [13]
DEBUG:root:Only one candidate, cluster centers are [array([13])]
DEBUG:root:Considering candidate cluster center [13]
DEBUG:root:lowRange = max(8, 0) = 8 and highRange = max(18, 17) = 17
DEBUG:root:Area size = 9, index = Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16], dtype='int64') with size 9
DEBUG:root:In area 8 - 16, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:with speed df shape is (17, 9), ransac_mask size = 17
DEBUG:root:filtering done, ransac deleted points = [0]
currSpeed > 81979, starting new quality segment at index 1
while considering point 2, speed = 14981.4125929
currSpeed < 81979, retaining index 2 in existing quality segment
while considering point 3, speed = 313.046615333
currSpeed < 81979, retaining index 3 in existing quality segment
while considering point 4, speed = 123.943165016
currSpeed < 81979, retaining index 4 in existing quality segment
while considering point 5, speed = 1968.73847641
currSpeed < 81979, retaining index 5 in existing quality segment
while considering point 6, speed = 27951.0481792
currSpeed < 81979, retaining index 6 in existing quality segment
while considering point 7, speed = 712.612180782
currSpeed < 81979, retaining index 7 in existing quality segment
while considering point 8, speed = 14095.3272942
currSpeed < 81979, retaining index 8 in existing quality segment
while considering point 9, speed = 14682.4165026
currSpeed < 81979, retaining index 9 in existing quality segment
while considering point 10, speed = 19165.6250991
currSpeed < 81979, retaining index 10 in existing quality segment
while considering point 11, speed = 3949.0168767
currSpeed < 81979, retaining index 11 in existing quality segment
while considering point 12, speed = 95603.8467501
currSpeed > 81979, starting new quality segment at index 12
while considering point 13, speed = 273955.752383
currSpeed > 81979, starting new quality segment at index 13
while considering point 14, speed = 14730.1201174
currSpeed < 81979, retaining index 14 in existing quality segment
while considering point 15, speed = 21463.3598652
currSpeed < 81979, retaining index 15 in existing quality segment
while considering point 16, speed = 5151.07635886
currSpeed < 81979, retaining index 16 in existing quality segment
Number of quality segments is 4
Considering segments [] and [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
Considering segments [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] and [12]
About to compare curr_segment duration 0.0 with last segment duration 313.0
curr segment [12] is shorter, cut it
Comparing distance 6405.45773225 with speed 81979.285945 * time 67.0 = 5492612.15832
Considering segments [12] and [13, 14, 15, 16]
About to compare curr_segment duration 127.0 with last segment duration 0.0
prev segment [12] is shorter, cut it
Comparing distance 8259.27716888 with speed 81979.285945 * time 153.0 = 12542830.7496
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
DEBUG:root:while considering point AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 102051.202075
DEBUG:root:currSpeed < 248170.069837, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})(2), prev_pt (AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})) speed = 14981.4125929
DEBUG:root:currSpeed < 248170.069837, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})(3), prev_pt (AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})) speed = 313.046615333
DEBUG:root:currSpeed < 248170.069837, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})(4), prev_pt (AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})) speed = 123.943165016
DEBUG:root:currSpeed < 248170.069837, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})(5), prev_pt (AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})) speed = 1968.73847641
DEBUG:root:currSpeed < 248170.069837, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})(6), prev_pt (AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})) speed = 27951.0481792
DEBUG:root:currSpeed < 248170.069837, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})(7), prev_pt (AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})) speed = 712.612180782
DEBUG:root:currSpeed < 248170.069837, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})(8), prev_pt (AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})) speed = 14095.3272942
DEBUG:root:currSpeed < 248170.069837, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})(9), prev_pt (AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})) speed = 14682.4165026
DEBUG:root:currSpeed < 248170.069837, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})(10), prev_pt (AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})) speed = 19165.6250991
DEBUG:root:currSpeed < 248170.069837, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})(11), prev_pt (AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})) speed = 3949.0168767
DEBUG:root:currSpeed < 248170.069837, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})(12), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 95603.8467501
DEBUG:root:currSpeed < 248170.069837, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})(13), prev_pt (AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})) speed = 273955.752383
DEBUG:root:currSpeed > 248170.069837, removing index 13
DEBUG:root:while considering point AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})(14), prev_pt (AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})) speed = 126394.677754
DEBUG:root:currSpeed < 248170.069837, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})(15), prev_pt (AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})) speed = 21463.3598652
DEBUG:root:currSpeed < 248170.069837, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 5151.0763588560403, u'mLongitude': -121.9436018, u'mLatitude': 37.285262600000003, u'mTime': 1425313353.0})(16), prev_pt (AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})) speed = 5151.07635886
DEBUG:root:currSpeed < 248170.069837, retaining index 16
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16]
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
while considering point 1, speed = 102051.202075
currSpeed < 248170, retaining index 1 in existing quality segment
while considering point 2, speed = 14981.4125929
currSpeed < 248170, retaining index 2 in existing quality segment
while considering point 3, speed = 313.046615333
currSpeed < 248170, retaining index 3 in existing quality segment
while considering point 4, speed = 123.943165016
currSpeed < 248170, retaining index 4 in existing quality segment
while considering point 5, speed = 1968.73847641
currSpeed < 248170, retaining index 5 in existing quality segment
while considering point 6, speed = 27951.0481792
currSpeed < 248170, retaining index 6 in existing quality segment
while considering point 7, speed = 712.612180782
currSpeed < 248170, retaining index 7 in existing quality segment
while considering point 8, speed = 14095.3272942
currSpeed < 248170, retaining index 8 in existing quality segment
while considering point 9, speed = 14682.4165026
currSpeed < 248170, retaining index 9 in existing quality segment
while considering point 10, speed = 19165.6250991
currSpeed < 248170, retaining index 10 in existing quality segment
while considering point 11, speed = 3949.0168767
currSpeed < 248170, retaining index 11 in existing quality segment
while considering point 12, speed = 95603.8467501
currSpeed < 248170, retaining index 12 in existing quality segment
while considering point 13, speed = 273955.752383
currSpeed > 248170, starting new quality segment at index 13
while considering point 14, speed = 14730.1201174
currSpeed < 248170, retaining index 14 in existing quality segment
while considering point 15, speed = 21463.3598652
currSpeed < 248170, retaining index 15 in existing quality segment
while considering point 16, speed = 5151.07635886
currSpeed < 248170, retaining index 16 in existing quality segment
Number of quality segments is 2
Considering segments [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] and [13, 14, 15, 16]
About to compare curr_segment duration 127.0 with last segment duration 380.0
curr segment [13, 14, 15, 16] is shorter, cut it
Comparing distance 7122.84956196 with speed 248170.069837 * time 26.0 = 6452421.81576
Comparing distance 7583.68066524 with speed 248170.069837 * time 60.0 = 14890204.1902
Comparing distance 7904.40278189 with speed 248170.069837 * time 83.0 = 20598115.7965
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
Comparing distance 8259.27716888 with speed 248170.069837 * time 153.0 = 37970020.685
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1425312783.0}}, {'data.mTime': {'$lt': 1425313388.0}}], 'user_id': u'20150302T081303-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
DEBUG:root:Found 3 potential outliers, list = [ 1 12 13]
DEBUG:root:Found 2 clusters with centers [[ 1]
[13]]
DEBUG:root:Considering candidate cluster center [1]
DEBUG:root:lowRange = max(-4, 0) = 0 and highRange = max(6, 17) = 6
DEBUG:root:Considering candidate cluster center [13]
DEBUG:root:lowRange = max(8, 0) = 8 and highRange = max(18, 17) = 17
DEBUG:root:Area size = 7, index = Int64Index([0, 1, 2, 3, 4, 5, 6], dtype='int64') with size 7
DEBUG:root:In area 0 - 6, deleted 2 points through ransac filtering
DEBUG:root:Retain mask is of size 7
DEBUG:root:Area size = 9, index = Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16], dtype='int64') with size 9
DEBUG:root:In area 8 - 16, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:with speed df shape is (17, 9), ransac_mask size = 17
DEBUG:root:filtering done, ransac deleted points = [0]
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
DEBUG:root:while considering point AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 102051.202075
DEBUG:root:currSpeed > 81979.285945, removing index 1
DEBUG:root:while considering point AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})(2), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 41493.023892
DEBUG:root:currSpeed < 81979.285945, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})(3), prev_pt (AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})) speed = 313.046615333
DEBUG:root:currSpeed < 81979.285945, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})(4), prev_pt (AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})) speed = 123.943165016
DEBUG:root:currSpeed < 81979.285945, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})(5), prev_pt (AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})) speed = 1968.73847641
DEBUG:root:currSpeed < 81979.285945, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})(6), prev_pt (AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})) speed = 27951.0481792
DEBUG:root:currSpeed < 81979.285945, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})(7), prev_pt (AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})) speed = 712.612180782
DEBUG:root:currSpeed < 81979.285945, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})(8), prev_pt (AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})) speed = 14095.3272942
DEBUG:root:currSpeed < 81979.285945, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})(9), prev_pt (AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})) speed = 14682.4165026
DEBUG:root:currSpeed < 81979.285945, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})(10), prev_pt (AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})) speed = 19165.6250991
DEBUG:root:currSpeed < 81979.285945, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})(11), prev_pt (AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})) speed = 3949.0168767
DEBUG:root:currSpeed < 81979.285945, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})(12), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 95603.8467501
DEBUG:root:currSpeed > 81979.285945, removing index 12
DEBUG:root:while considering point AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})(13), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 8047.59417975
DEBUG:root:currSpeed < 81979.285945, retaining index 13
DEBUG:root:while considering point AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})(14), prev_pt (AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})) speed = 14730.1201174
DEBUG:root:currSpeed < 81979.285945, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})(15), prev_pt (AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})) speed = 21463.3598652
DEBUG:root:currSpeed < 81979.285945, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 5151.0763588560403, u'mLongitude': -121.9436018, u'mLatitude': 37.285262600000003, u'mTime': 1425313353.0})(16), prev_pt (AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})) speed = 5151.07635886
DEBUG:root:currSpeed < 81979.285945, retaining index 16
INFO:root:Filtering complete, removed indices = [ 0 2 3 4 5 6 7 8 9 10 11 13 14 15 16]
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
INFO:root:len(last_segment) = 0, len(curr_segment) = 11, skipping
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
filtered list size went from (23, 8) to (17, 8)
while considering point 1, speed = 102051.202075
currSpeed > 81979, starting new quality segment at index 1
while considering point 2, speed = 14981.4125929
currSpeed < 81979, retaining index 2 in existing quality segment
while considering point 3, speed = 313.046615333
currSpeed < 81979, retaining index 3 in existing quality segment
while considering point 4, speed = 123.943165016
currSpeed < 81979, retaining index 4 in existing quality segment
while considering point 5, speed = 1968.73847641
currSpeed < 81979, retaining index 5 in existing quality segment
while considering point 6, speed = 27951.0481792
currSpeed < 81979, retaining index 6 in existing quality segment
while considering point 7, speed = 712.612180782
currSpeed < 81979, retaining index 7 in existing quality segment
while considering point 8, speed = 14095.3272942
currSpeed < 81979, retaining index 8 in existing quality segment
while considering point 9, speed = 14682.4165026
currSpeed < 81979, retaining index 9 in existing quality segment
while considering point 10, speed = 19165.6250991
currSpeed < 81979, retaining index 10 in existing quality segment
while considering point 11, speed = 3949.0168767
currSpeed < 81979, retaining index 11 in existing quality segment
while considering point 12, speed = 95603.8467501
currSpeed > 81979, starting new quality segment at index 12
while considering point 13, speed = 273955.752383
currSpeed > 81979, starting new quality segment at index 13
while considering point 14, speed = 14730.1201174
currSpeed < 81979, retaining index 14 in existing quality segment
while considering point 15, speed = 21463.3598652
currSpeed < 81979, retaining index 15 in existing quality segment
while considering point 16, speed = 5151.07635886
currSpeed < 81979, retaining index 16 in existing quality segment
Number of quality segments is 4
Considering segments [] and [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
Considering segments [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] and [12]
About to compare curr_segment duration 0.0 with last segment duration 313.0
curr segment [12] is shorter, cut it
Comparing distance 6405.45773225 with speed 81979.285945 * time 67.0 = 5492612.15832
Considering segments [12] and [13, 14, 15, 16]
About to compare curr_segment duration 127.0 with last segment duration 0.0
prev segment [12] is shorter, cut it
Comparing distance 8259.27716888 with speed 81979.285945 * time 153.0 = 12542830.7496
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:Found 1 potential outliers, list = [13]
DEBUG:root:Only one candidate, cluster centers are [array([13])]
DEBUG:root:Considering candidate cluster center [13]
DEBUG:root:lowRange = max(8, 0) = 8 and highRange = max(18, 17) = 17
DEBUG:root:Area size = 9, index = Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16], dtype='int64') with size 9
DEBUG:root:In area 8 - 16, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:with speed df shape is (17, 9), ransac_mask size = 17
DEBUG:root:filtering done, ransac deleted points = [0]
DEBUG:root:while considering point AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 102051.202075
DEBUG:root:currSpeed < 248170.069837, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})(2), prev_pt (AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})) speed = 14981.4125929
DEBUG:root:currSpeed < 248170.069837, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})(3), prev_pt (AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})) speed = 313.046615333
DEBUG:root:currSpeed < 248170.069837, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})(4), prev_pt (AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})) speed = 123.943165016
DEBUG:root:currSpeed < 248170.069837, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})(5), prev_pt (AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})) speed = 1968.73847641
DEBUG:root:currSpeed < 248170.069837, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})(6), prev_pt (AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})) speed = 27951.0481792
DEBUG:root:currSpeed < 248170.069837, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})(7), prev_pt (AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})) speed = 712.612180782
DEBUG:root:currSpeed < 248170.069837, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})(8), prev_pt (AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})) speed = 14095.3272942
DEBUG:root:currSpeed < 248170.069837, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})(9), prev_pt (AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})) speed = 14682.4165026
DEBUG:root:currSpeed < 248170.069837, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})(10), prev_pt (AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})) speed = 19165.6250991
DEBUG:root:currSpeed < 248170.069837, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})(11), prev_pt (AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})) speed = 3949.0168767
DEBUG:root:currSpeed < 248170.069837, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})(12), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 95603.8467501
DEBUG:root:currSpeed < 248170.069837, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})(13), prev_pt (AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})) speed = 273955.752383
DEBUG:root:currSpeed > 248170.069837, removing index 13
DEBUG:root:while considering point AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})(14), prev_pt (AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})) speed = 126394.677754
DEBUG:root:currSpeed < 248170.069837, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})(15), prev_pt (AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})) speed = 21463.3598652
DEBUG:root:currSpeed < 248170.069837, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 5151.0763588560403, u'mLongitude': -121.9436018, u'mLatitude': 37.285262600000003, u'mTime': 1425313353.0})(16), prev_pt (AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})) speed = 5151.07635886
DEBUG:root:currSpeed < 248170.069837, retaining index 16
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16]
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
filtered list size went from (23, 8) to (17, 8)
while considering point 1, speed = 102051.202075
currSpeed < 248170, retaining index 1 in existing quality segment
while considering point 2, speed = 14981.4125929
currSpeed < 248170, retaining index 2 in existing quality segment
while considering point 3, speed = 313.046615333
currSpeed < 248170, retaining index 3 in existing quality segment
while considering point 4, speed = 123.943165016
currSpeed < 248170, retaining index 4 in existing quality segment
while considering point 5, speed = 1968.73847641
currSpeed < 248170, retaining index 5 in existing quality segment
while considering point 6, speed = 27951.0481792
currSpeed < 248170, retaining index 6 in existing quality segment
while considering point 7, speed = 712.612180782
currSpeed < 248170, retaining index 7 in existing quality segment
while considering point 8, speed = 14095.3272942
currSpeed < 248170, retaining index 8 in existing quality segment
while considering point 9, speed = 14682.4165026
currSpeed < 248170, retaining index 9 in existing quality segment
while considering point 10, speed = 19165.6250991
currSpeed < 248170, retaining index 10 in existing quality segment
while considering point 11, speed = 3949.0168767
currSpeed < 248170, retaining index 11 in existing quality segment
while considering point 12, speed = 95603.8467501
currSpeed < 248170, retaining index 12 in existing quality segment
while considering point 13, speed = 273955.752383
currSpeed > 248170, starting new quality segment at index 13
while considering point 14, speed = 14730.1201174
currSpeed < 248170, retaining index 14 in existing quality segment
while considering point 15, speed = 21463.3598652
currSpeed < 248170, retaining index 15 in existing quality segment
while considering point 16, speed = 5151.07635886
currSpeed < 248170, retaining index 16 in existing quality segment
Number of quality segments is 2
Considering segments [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] and [13, 14, 15, 16]
About to compare curr_segment duration 127.0 with last segment duration 380.0
curr segment [13, 14, 15, 16] is shorter, cut it
Comparing distance 7122.84956196 with speed 248170.069837 * time 26.0 = 6452421.81576
Comparing distance 7583.68066524 with speed 248170.069837 * time 60.0 = 14890204.1902
Comparing distance 7904.40278189 with speed 248170.069837 * time 83.0 = 20598115.7965
Comparing distance 8259.27716888 with speed 248170.069837 * time 153.0 = 37970020.685
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1425312783.0}}, {'data.mTime': {'$lt': 1425313388.0}}], 'user_id': u'20150302T081303-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
DEBUG:root:Found 3 potential outliers, list = [ 1 12 13]
DEBUG:root:Found 2 clusters with centers [[ 1]
[13]]
DEBUG:root:Considering candidate cluster center [1]
DEBUG:root:lowRange = max(-4, 0) = 0 and highRange = max(6, 17) = 6
DEBUG:root:Considering candidate cluster center [13]
DEBUG:root:lowRange = max(8, 0) = 8 and highRange = max(18, 17) = 17
DEBUG:root:Area size = 7, index = Int64Index([0, 1, 2, 3, 4, 5, 6], dtype='int64') with size 7
DEBUG:root:In area 0 - 6, deleted 2 points through ransac filtering
DEBUG:root:Retain mask is of size 7
DEBUG:root:Area size = 9, index = Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16], dtype='int64') with size 9
DEBUG:root:In area 8 - 16, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:with speed df shape is (17, 9), ransac_mask size = 17
DEBUG:root:filtering done, ransac deleted points = [0]
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
DEBUG:root:while considering point AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 102051.202075
DEBUG:root:currSpeed > 81979.285945, removing index 1
DEBUG:root:while considering point AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})(2), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 41493.023892
DEBUG:root:currSpeed < 81979.285945, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})(3), prev_pt (AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})) speed = 313.046615333
DEBUG:root:currSpeed < 81979.285945, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})(4), prev_pt (AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})) speed = 123.943165016
DEBUG:root:currSpeed < 81979.285945, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})(5), prev_pt (AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})) speed = 1968.73847641
DEBUG:root:currSpeed < 81979.285945, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})(6), prev_pt (AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})) speed = 27951.0481792
DEBUG:root:currSpeed < 81979.285945, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})(7), prev_pt (AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})) speed = 712.612180782
DEBUG:root:currSpeed < 81979.285945, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})(8), prev_pt (AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})) speed = 14095.3272942
DEBUG:root:currSpeed < 81979.285945, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})(9), prev_pt (AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})) speed = 14682.4165026
DEBUG:root:currSpeed < 81979.285945, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})(10), prev_pt (AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})) speed = 19165.6250991
DEBUG:root:currSpeed < 81979.285945, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})(11), prev_pt (AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})) speed = 3949.0168767
DEBUG:root:currSpeed < 81979.285945, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})(12), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 95603.8467501
DEBUG:root:currSpeed > 81979.285945, removing index 12
DEBUG:root:while considering point AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})(13), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 8047.59417975
DEBUG:root:currSpeed < 81979.285945, retaining index 13
DEBUG:root:while considering point AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})(14), prev_pt (AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})) speed = 14730.1201174
DEBUG:root:currSpeed < 81979.285945, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})(15), prev_pt (AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})) speed = 21463.3598652
DEBUG:root:currSpeed < 81979.285945, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 5151.0763588560403, u'mLongitude': -121.9436018, u'mLatitude': 37.285262600000003, u'mTime': 1425313353.0})(16), prev_pt (AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})) speed = 5151.07635886
DEBUG:root:currSpeed < 81979.285945, retaining index 16
INFO:root:Filtering complete, removed indices = [ 0 2 3 4 5 6 7 8 9 10 11 13 14 15 16]
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
while considering point 1, speed = 102051.202075
INFO:root:len(last_segment) = 0, len(curr_segment) = 11, skipping
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
DEBUG:root:Found 1 potential outliers, list = [13]
DEBUG:root:Only one candidate, cluster centers are [array([13])]
DEBUG:root:Considering candidate cluster center [13]
DEBUG:root:lowRange = max(8, 0) = 8 and highRange = max(18, 17) = 17
DEBUG:root:Area size = 9, index = Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16], dtype='int64') with size 9
DEBUG:root:In area 8 - 16, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:with speed df shape is (17, 9), ransac_mask size = 17
DEBUG:root:filtering done, ransac deleted points = [0]
currSpeed > 81979, starting new quality segment at index 1
while considering point 2, speed = 14981.4125929
currSpeed < 81979, retaining index 2 in existing quality segment
while considering point 3, speed = 313.046615333
currSpeed < 81979, retaining index 3 in existing quality segment
while considering point 4, speed = 123.943165016
currSpeed < 81979, retaining index 4 in existing quality segment
while considering point 5, speed = 1968.73847641
currSpeed < 81979, retaining index 5 in existing quality segment
while considering point 6, speed = 27951.0481792
currSpeed < 81979, retaining index 6 in existing quality segment
while considering point 7, speed = 712.612180782
currSpeed < 81979, retaining index 7 in existing quality segment
while considering point 8, speed = 14095.3272942
currSpeed < 81979, retaining index 8 in existing quality segment
while considering point 9, speed = 14682.4165026
currSpeed < 81979, retaining index 9 in existing quality segment
while considering point 10, speed = 19165.6250991
currSpeed < 81979, retaining index 10 in existing quality segment
while considering point 11, speed = 3949.0168767
currSpeed < 81979, retaining index 11 in existing quality segment
while considering point 12, speed = 95603.8467501
currSpeed > 81979, starting new quality segment at index 12
while considering point 13, speed = 273955.752383
currSpeed > 81979, starting new quality segment at index 13
while considering point 14, speed = 14730.1201174
currSpeed < 81979, retaining index 14 in existing quality segment
while considering point 15, speed = 21463.3598652
currSpeed < 81979, retaining index 15 in existing quality segment
while considering point 16, speed = 5151.07635886
currSpeed < 81979, retaining index 16 in existing quality segment
Number of quality segments is 4
Considering segments [] and [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
Considering segments [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] and [12]
About to compare curr_segment duration 0.0 with last segment duration 313.0
curr segment [12] is shorter, cut it
Comparing distance 6405.45773225 with speed 81979.285945 * time 67.0 = 5492612.15832
Considering segments [12] and [13, 14, 15, 16]
About to compare curr_segment duration 127.0 with last segment duration 0.0
prev segment [12] is shorter, cut it
Comparing distance 8259.27716888 with speed 81979.285945 * time 153.0 = 12542830.7496
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
DEBUG:root:while considering point AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 102051.202075
DEBUG:root:currSpeed < 248170.069837, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})(2), prev_pt (AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})) speed = 14981.4125929
DEBUG:root:currSpeed < 248170.069837, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})(3), prev_pt (AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})) speed = 313.046615333
DEBUG:root:currSpeed < 248170.069837, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})(4), prev_pt (AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})) speed = 123.943165016
DEBUG:root:currSpeed < 248170.069837, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})(5), prev_pt (AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})) speed = 1968.73847641
DEBUG:root:currSpeed < 248170.069837, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})(6), prev_pt (AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})) speed = 27951.0481792
DEBUG:root:currSpeed < 248170.069837, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})(7), prev_pt (AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})) speed = 712.612180782
DEBUG:root:currSpeed < 248170.069837, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})(8), prev_pt (AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})) speed = 14095.3272942
DEBUG:root:currSpeed < 248170.069837, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})(9), prev_pt (AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})) speed = 14682.4165026
DEBUG:root:currSpeed < 248170.069837, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})(10), prev_pt (AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})) speed = 19165.6250991
DEBUG:root:currSpeed < 248170.069837, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})(11), prev_pt (AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})) speed = 3949.0168767
DEBUG:root:currSpeed < 248170.069837, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})(12), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 95603.8467501
DEBUG:root:currSpeed < 248170.069837, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})(13), prev_pt (AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})) speed = 273955.752383
DEBUG:root:currSpeed > 248170.069837, removing index 13
DEBUG:root:while considering point AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})(14), prev_pt (AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})) speed = 126394.677754
DEBUG:root:currSpeed < 248170.069837, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})(15), prev_pt (AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})) speed = 21463.3598652
DEBUG:root:currSpeed < 248170.069837, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 5151.0763588560403, u'mLongitude': -121.9436018, u'mLatitude': 37.285262600000003, u'mTime': 1425313353.0})(16), prev_pt (AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})) speed = 5151.07635886
DEBUG:root:currSpeed < 248170.069837, retaining index 16
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16]
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
while considering point 1, speed = 102051.202075
currSpeed < 248170, retaining index 1 in existing quality segment
while considering point 2, speed = 14981.4125929
currSpeed < 248170, retaining index 2 in existing quality segment
while considering point 3, speed = 313.046615333
currSpeed < 248170, retaining index 3 in existing quality segment
while considering point 4, speed = 123.943165016
currSpeed < 248170, retaining index 4 in existing quality segment
while considering point 5, speed = 1968.73847641
currSpeed < 248170, retaining index 5 in existing quality segment
while considering point 6, speed = 27951.0481792
currSpeed < 248170, retaining index 6 in existing quality segment
while considering point 7, speed = 712.612180782
currSpeed < 248170, retaining index 7 in existing quality segment
while considering point 8, speed = 14095.3272942
currSpeed < 248170, retaining index 8 in existing quality segment
while considering point 9, speed = 14682.4165026
currSpeed < 248170, retaining index 9 in existing quality segment
while considering point 10, speed = 19165.6250991
currSpeed < 248170, retaining index 10 in existing quality segment
while considering point 11, speed = 3949.0168767
currSpeed < 248170, retaining index 11 in existing quality segment
while considering point 12, speed = 95603.8467501
currSpeed < 248170, retaining index 12 in existing quality segment
while considering point 13, speed = 273955.752383
currSpeed > 248170, starting new quality segment at index 13
while considering point 14, speed = 14730.1201174
currSpeed < 248170, retaining index 14 in existing quality segment
while considering point 15, speed = 21463.3598652
currSpeed < 248170, retaining index 15 in existing quality segment
while considering point 16, speed = 5151.07635886
currSpeed < 248170, retaining index 16 in existing quality segment
Number of quality segments is 2
Considering segments [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] and [13, 14, 15, 16]
About to compare curr_segment duration 127.0 with last segment duration 380.0
curr segment [13, 14, 15, 16] is shorter, cut it
Comparing distance 7122.84956196 with speed 248170.069837 * time 26.0 = 6452421.81576
Comparing distance 7583.68066524 with speed 248170.069837 * time 60.0 = 14890204.1902
Comparing distance 7904.40278189 with speed 248170.069837 * time 83.0 = 20598115.7965
Comparing distance 8259.27716888 with speed 248170.069837 * time 153.0 = 37970020.685
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1425312783.0}}, {'data.mTime': {'$lt': 1425313388.0}}], 'user_id': u'20150302T081303-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
DEBUG:root:Found 3 potential outliers, list = [ 1 12 13]
DEBUG:root:Found 2 clusters with centers [[ 1]
[13]]
DEBUG:root:Considering candidate cluster center [1]
DEBUG:root:lowRange = max(-4, 0) = 0 and highRange = max(6, 17) = 6
DEBUG:root:Considering candidate cluster center [13]
DEBUG:root:lowRange = max(8, 0) = 8 and highRange = max(18, 17) = 17
DEBUG:root:Area size = 7, index = Int64Index([0, 1, 2, 3, 4, 5, 6], dtype='int64') with size 7
DEBUG:root:In area 0 - 6, deleted 2 points through ransac filtering
DEBUG:root:Retain mask is of size 7
DEBUG:root:Area size = 9, index = Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16], dtype='int64') with size 9
DEBUG:root:In area 8 - 16, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:with speed df shape is (17, 9), ransac_mask size = 17
DEBUG:root:filtering done, ransac deleted points = [0]
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
DEBUG:root:while considering point AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 102051.202075
DEBUG:root:currSpeed > 81979.285945, removing index 1
DEBUG:root:while considering point AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})(2), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 41493.023892
DEBUG:root:currSpeed < 81979.285945, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})(3), prev_pt (AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})) speed = 313.046615333
DEBUG:root:currSpeed < 81979.285945, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})(4), prev_pt (AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})) speed = 123.943165016
DEBUG:root:currSpeed < 81979.285945, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})(5), prev_pt (AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})) speed = 1968.73847641
DEBUG:root:currSpeed < 81979.285945, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})(6), prev_pt (AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})) speed = 27951.0481792
DEBUG:root:currSpeed < 81979.285945, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})(7), prev_pt (AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})) speed = 712.612180782
DEBUG:root:currSpeed < 81979.285945, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})(8), prev_pt (AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})) speed = 14095.3272942
DEBUG:root:currSpeed < 81979.285945, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})(9), prev_pt (AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})) speed = 14682.4165026
DEBUG:root:currSpeed < 81979.285945, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})(10), prev_pt (AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})) speed = 19165.6250991
DEBUG:root:currSpeed < 81979.285945, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})(11), prev_pt (AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})) speed = 3949.0168767
DEBUG:root:currSpeed < 81979.285945, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})(12), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 95603.8467501
DEBUG:root:currSpeed > 81979.285945, removing index 12
DEBUG:root:while considering point AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})(13), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 8047.59417975
DEBUG:root:currSpeed < 81979.285945, retaining index 13
DEBUG:root:while considering point AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})(14), prev_pt (AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})) speed = 14730.1201174
DEBUG:root:currSpeed < 81979.285945, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})(15), prev_pt (AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})) speed = 21463.3598652
DEBUG:root:currSpeed < 81979.285945, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 5151.0763588560403, u'mLongitude': -121.9436018, u'mLatitude': 37.285262600000003, u'mTime': 1425313353.0})(16), prev_pt (AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})) speed = 5151.07635886
DEBUG:root:currSpeed < 81979.285945, retaining index 16
INFO:root:Filtering complete, removed indices = [ 0 2 3 4 5 6 7 8 9 10 11 13 14 15 16]
DEBUG:root:quartile values are 0.25 3453.947277
0.75 23085.281944
Name: speed, dtype: float64
DEBUG:root:iqr 19631.3346671
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
while considering point 1, speed = 102051.202075
INFO:root:len(last_segment) = 0, len(curr_segment) = 11, skipping
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
DEBUG:root:Found 1 potential outliers, list = [13]
DEBUG:root:Only one candidate, cluster centers are [array([13])]
DEBUG:root:Considering candidate cluster center [13]
DEBUG:root:lowRange = max(8, 0) = 8 and highRange = max(18, 17) = 17
DEBUG:root:Area size = 9, index = Int64Index([8, 9, 10, 11, 12, 13, 14, 15, 16], dtype='int64') with size 9
DEBUG:root:In area 8 - 16, deleted 0 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:with speed df shape is (17, 9), ransac_mask size = 17
DEBUG:root:filtering done, ransac deleted points = [0]
DEBUG:root:while considering point AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -121.90233550000001, u'mLatitude': 37.351897100000002, u'mTime': 1425312789.0})) speed = 102051.202075
DEBUG:root:currSpeed < 248170.069837, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})(2), prev_pt (AttrDict({'speed': 102051.20207526717, u'mLongitude': -121.90350979999999, u'mLatitude': 37.323461600000002, u'mTime': 1425312820.0})) speed = 14981.4125929
DEBUG:root:currSpeed < 248170.069837, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})(3), prev_pt (AttrDict({'speed': 14981.412592898412, u'mLongitude': -121.91044549999999, u'mLatitude': 37.316659299999998, u'mTime': 1425312885.0})) speed = 313.046615333
DEBUG:root:currSpeed < 248170.069837, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})(4), prev_pt (AttrDict({'speed': 313.0466153326438, u'mLongitude': -121.91046540000001, u'mLatitude': 37.316626300000003, u'mTime': 1425312898.0})) speed = 123.943165016
DEBUG:root:currSpeed < 248170.069837, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})(5), prev_pt (AttrDict({'speed': 123.94316501556249, u'mLongitude': -121.91046590000001, u'mLatitude': 37.3166419, u'mTime': 1425312912.0})) speed = 1968.73847641
DEBUG:root:currSpeed < 248170.069837, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})(6), prev_pt (AttrDict({'speed': 1968.7384764082592, u'mLongitude': -121.9109084, u'mLatitude': 37.3161755, u'mTime': 1425312945.0})) speed = 27951.0481792
DEBUG:root:currSpeed < 248170.069837, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})(7), prev_pt (AttrDict({'speed': 27951.048179179717, u'mLongitude': -121.91819649999999, u'mLatitude': 37.309894999999997, u'mTime': 1425312979.0})) speed = 712.612180782
DEBUG:root:currSpeed < 248170.069837, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})(8), prev_pt (AttrDict({'speed': 712.61218078195202, u'mLongitude': -121.9183381, u'mLatitude': 37.309772199999998, u'mTime': 1425313005.0})) speed = 14095.3272942
DEBUG:root:currSpeed < 248170.069837, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})(9), prev_pt (AttrDict({'speed': 14095.327294174795, u'mLongitude': -121.9222185, u'mLatitude': 37.306410800000002, u'mTime': 1425313041.0})) speed = 14682.4165026
DEBUG:root:currSpeed < 248170.069837, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})(10), prev_pt (AttrDict({'speed': 14682.416502637881, u'mLongitude': -121.9247056, u'mLatitude': 37.303604999999997, u'mTime': 1425313067.0})) speed = 19165.6250991
DEBUG:root:currSpeed < 248170.069837, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})(11), prev_pt (AttrDict({'speed': 19165.625099050496, u'mLongitude': -121.92918349999999, u'mLatitude': 37.299622300000003, u'mTime': 1425313098.0})) speed = 3949.0168767
DEBUG:root:currSpeed < 248170.069837, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})(12), prev_pt (AttrDict({'speed': 3949.01687670211, u'mLongitude': -121.93030760000001, u'mLatitude': 37.298758900000003, u'mTime': 1425313133.0})) speed = 95603.8467501
DEBUG:root:currSpeed < 248170.069837, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 273955.75238308671, u'mLongitude': -121.93576760000001, u'mLatitude': 37.2936172, u'mTime': 1425313226.0})(13), prev_pt (AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})) speed = 273955.752383
DEBUG:root:currSpeed > 248170.069837, removing index 13
DEBUG:root:while considering point AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})(14), prev_pt (AttrDict({'speed': 95603.846750053257, u'mLongitude': -121.9023361, u'mLatitude': 37.351897000000001, u'mTime': 1425313200.0})) speed = 126394.677754
DEBUG:root:currSpeed < 248170.069837, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})(15), prev_pt (AttrDict({'speed': 14730.120117435845, u'mLongitude': -121.935835, u'mLatitude': 37.289113499999999, u'mTime': 1425313260.0})) speed = 21463.3598652
DEBUG:root:currSpeed < 248170.069837, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 5151.0763588560403, u'mLongitude': -121.9436018, u'mLatitude': 37.285262600000003, u'mTime': 1425313353.0})(16), prev_pt (AttrDict({'speed': 21463.359865237122, u'mLongitude': -121.9411954, u'mLatitude': 37.287879799999999, u'mTime': 1425313283.0})) speed = 5151.07635886
DEBUG:root:currSpeed < 248170.069837, retaining index 16
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16]
currSpeed > 81979, starting new quality segment at index 1
while considering point 2, speed = 14981.4125929
currSpeed < 81979, retaining index 2 in existing quality segment
while considering point 3, speed = 313.046615333
currSpeed < 81979, retaining index 3 in existing quality segment
while considering point 4, speed = 123.943165016
currSpeed < 81979, retaining index 4 in existing quality segment
while considering point 5, speed = 1968.73847641
currSpeed < 81979, retaining index 5 in existing quality segment
while considering point 6, speed = 27951.0481792
currSpeed < 81979, retaining index 6 in existing quality segment
while considering point 7, speed = 712.612180782
currSpeed < 81979, retaining index 7 in existing quality segment
while considering point 8, speed = 14095.3272942
currSpeed < 81979, retaining index 8 in existing quality segment
while considering point 9, speed = 14682.4165026
currSpeed < 81979, retaining index 9 in existing quality segment
while considering point 10, speed = 19165.6250991
currSpeed < 81979, retaining index 10 in existing quality segment
while considering point 11, speed = 3949.0168767
currSpeed < 81979, retaining index 11 in existing quality segment
while considering point 12, speed = 95603.8467501
currSpeed > 81979, starting new quality segment at index 12
while considering point 13, speed = 273955.752383
currSpeed > 81979, starting new quality segment at index 13
while considering point 14, speed = 14730.1201174
currSpeed < 81979, retaining index 14 in existing quality segment
while considering point 15, speed = 21463.3598652
currSpeed < 81979, retaining index 15 in existing quality segment
while considering point 16, speed = 5151.07635886
currSpeed < 81979, retaining index 16 in existing quality segment
Number of quality segments is 4
Considering segments [] and [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
Considering segments [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] and [12]
About to compare curr_segment duration 0.0 with last segment duration 313.0
curr segment [12] is shorter, cut it
Comparing distance 6405.45773225 with speed 81979.285945 * time 67.0 = 5492612.15832
Considering segments [12] and [13, 14, 15, 16]
About to compare curr_segment duration 127.0 with last segment duration 0.0
prev segment [12] is shorter, cut it
Comparing distance 8259.27716888 with speed 81979.285945 * time 153.0 = 12542830.7496
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
filtered list size went from (23, 8) to (17, 8)
filtering points Int64Index([2, 11, 14, 19, 20, 21], dtype='int64')
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]
DEBUG:root:Returning list with length 10
filtered list size went from (23, 8) to (17, 8)
while considering point 1, speed = 102051.202075
currSpeed < 248170, retaining index 1 in existing quality segment
while considering point 2, speed = 14981.4125929
currSpeed < 248170, retaining index 2 in existing quality segment
while considering point 3, speed = 313.046615333
currSpeed < 248170, retaining index 3 in existing quality segment
while considering point 4, speed = 123.943165016
currSpeed < 248170, retaining index 4 in existing quality segment
while considering point 5, speed = 1968.73847641
currSpeed < 248170, retaining index 5 in existing quality segment
while considering point 6, speed = 27951.0481792
currSpeed < 248170, retaining index 6 in existing quality segment
while considering point 7, speed = 712.612180782
currSpeed < 248170, retaining index 7 in existing quality segment
while considering point 8, speed = 14095.3272942
currSpeed < 248170, retaining index 8 in existing quality segment
while considering point 9, speed = 14682.4165026
currSpeed < 248170, retaining index 9 in existing quality segment
while considering point 10, speed = 19165.6250991
currSpeed < 248170, retaining index 10 in existing quality segment
while considering point 11, speed = 3949.0168767
currSpeed < 248170, retaining index 11 in existing quality segment
while considering point 12, speed = 95603.8467501
currSpeed < 248170, retaining index 12 in existing quality segment
while considering point 13, speed = 273955.752383
currSpeed > 248170, starting new quality segment at index 13
while considering point 14, speed = 14730.1201174
currSpeed < 248170, retaining index 14 in existing quality segment
while considering point 15, speed = 21463.3598652
currSpeed < 248170, retaining index 15 in existing quality segment
while considering point 16, speed = 5151.07635886
currSpeed < 248170, retaining index 16 in existing quality segment
Number of quality segments is 2
Considering segments [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] and [13, 14, 15, 16]
About to compare curr_segment duration 127.0 with last segment duration 380.0
curr segment [13, 14, 15, 16] is shorter, cut it
Comparing distance 7122.84956196 with speed 248170.069837 * time 26.0 = 6452421.81576
Comparing distance 7583.68066524 with speed 248170.069837 * time 60.0 = 14890204.1902
Comparing distance 7904.40278189 with speed 248170.069837 * time 83.0 = 20598115.7965
Comparing distance 8259.27716888 with speed 248170.069837 * time 153.0 = 37970020.685
In [42]:
[len(row[0]) for row in section2_times10]
Out[42]:
[8, 8, 8, 8, 8, 8, 8, 8, 8, 8]
In [45]:
def two_row_list(map_list):
two_row_map_list = []
for map_row in map_list:
curr_two_rows = two_rows(map_row[0])
two_row_map_list.append(curr_two_rows[0])
two_row_map_list.append(curr_two_rows[1])
return two_row_map_list
In [46]:
ipy.inline_maps(two_row_list(section2_times10), len(section2_times10) * 2, 4)
Out[46]:
In [47]:
def two_row_list(map_list):
two_row_map_list = []
for map_row in map_list:
curr_two_rows = two_rows(map_row)
two_row_map_list.append(curr_two_rows[0])
two_row_map_list.append(curr_two_rows[1])
return two_row_map_list
In [48]:
walk_section_ground_truth_list = json.load(open("/Users/shankari/cluster_ground_truth/smoothing/eagle_park/smoothing_removed_points"))
In [49]:
walk_section_id_list = [extract_raw_section_id(key) for key in walk_section_ground_truth_list.keys()]
In [50]:
walk_section_list = [lq.get_section(sid) for sid in walk_section_id_list if lq.get_section(sid) is not None]
In [51]:
walk_map_list = lo.evaluate_filtering(walk_section_list, [cso.BoxplotOutlier(ignore_zeros=True), cso.SimpleQuartileOutlier(ignore_zeros=True)],
[cjs.SmoothPiecewiseRansac(), cjs.SmoothBoundary(), cjs.SmoothPosdap()])
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1424917398.0}}, {'data.mTime': {'$lt': 1424918351.0}}], 'user_id': u'20150225T182318-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([11, 12, 13], dtype='int64')
DEBUG:root:quartile values are 0.25 374.021700
0.75 2249.230185
Name: speed, dtype: float64
DEBUG:root:iqr 1875.20848488
DEBUG:root:Found 3 potential outliers, list = [ 2 4 10]
DEBUG:root:Found 2 clusters with centers [[ 4]
[10]]
DEBUG:root:Considering candidate cluster center [4]
DEBUG:root:lowRange = max(-1, 0) = 0 and highRange = max(9, 28) = 9
DEBUG:root:Considering candidate cluster center [10]
DEBUG:root:lowRange = max(5, 0) = 5 and highRange = max(15, 28) = 15
DEBUG:root:Area size = 10, index = Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype='int64') with size 10
DEBUG:root:In area 0 - 9, deleted 2 points through ransac filtering
DEBUG:root:Retain mask is of size 10
DEBUG:root:Area size = 11, index = Int64Index([5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], dtype='int64') with size 11
DEBUG:root:In area 5 - 15, deleted 2 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:with speed df shape is (28, 9), ransac_mask size = 28
DEBUG:root:filtering done, ransac deleted points = [0]
filtered list size went from (31, 8) to (28, 8)
filtering points Int64Index([11, 12, 13], dtype='int64')
filtered list size went from (31, 8) to (28, 8)
filtering points Int64Index([11, 12, 13], dtype='int64')
DEBUG:root:quartile values are 0.25 374.021700
0.75 2249.230185
Name: speed, dtype: float64
DEBUG:root:iqr 1875.20848488
DEBUG:root:while considering point AttrDict({'speed': 985.01704495911906, u'mLongitude': -122.0863873, u'mLatitude': 37.390851099999999, u'mTime': 1424917434.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -122.08624260000001, u'mLatitude': 37.391090699999999, u'mTime': 1424917404.0})) speed = 985.017044959
DEBUG:root:currSpeed < 7874.8556394, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 11222.576996378815, u'mLongitude': -122.088128, u'mLatitude': 37.388386699999998, u'mTime': 1424917462.0})(2), prev_pt (AttrDict({'speed': 985.01704495911906, u'mLongitude': -122.0863873, u'mLatitude': 37.390851099999999, u'mTime': 1424917434.0})) speed = 11222.5769964
DEBUG:root:currSpeed > 7874.8556394, removing index 2
DEBUG:root:while considering point AttrDict({'speed': 1435.2945896234044, u'mLongitude': -122.0882433, u'mLatitude': 37.388261800000002, u'mTime': 1424917474.0})(3), prev_pt (AttrDict({'speed': 985.01704495911906, u'mLongitude': -122.0863873, u'mLatitude': 37.390851099999999, u'mTime': 1424917434.0})) speed = 8283.38517303
DEBUG:root:currSpeed > 7874.8556394, removing index 3
DEBUG:root:while considering point AttrDict({'speed': 10597.003098293901, u'mLongitude': -122.086327, u'mLatitude': 37.390681700000002, u'mTime': 1424917504.0})(4), prev_pt (AttrDict({'speed': 985.01704495911906, u'mLongitude': -122.0863873, u'mLatitude': 37.390851099999999, u'mTime': 1424917434.0})) speed = 279.64639639
DEBUG:root:currSpeed < 7874.8556394, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 270.70774522230408, u'mLongitude': -122.0864162, u'mLatitude': 37.390737299999998, u'mTime': 1424917541.0})(5), prev_pt (AttrDict({'speed': 10597.003098293901, u'mLongitude': -122.086327, u'mLatitude': 37.390681700000002, u'mTime': 1424917504.0})) speed = 270.707745222
DEBUG:root:currSpeed < 7874.8556394, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 320.03185198554195, u'mLongitude': -122.0863439, u'mLatitude': 37.390740999999998, u'mTime': 1424917561.0})(6), prev_pt (AttrDict({'speed': 270.70774522230408, u'mLongitude': -122.0864162, u'mLatitude': 37.390737299999998, u'mTime': 1424917541.0})) speed = 320.031851986
DEBUG:root:currSpeed < 7874.8556394, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 1354.120442205329, u'mLongitude': -122.0861865, u'mLatitude': 37.391097199999997, u'mTime': 1424917592.0})(7), prev_pt (AttrDict({'speed': 320.03185198554195, u'mLongitude': -122.0863439, u'mLatitude': 37.390740999999998, u'mTime': 1424917561.0})) speed = 1354.12044221
DEBUG:root:currSpeed < 7874.8556394, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 437.21515358985135, u'mLongitude': -122.086236, u'mLatitude': 37.3910792, u'mTime': 1424917603.0})(8), prev_pt (AttrDict({'speed': 1354.120442205329, u'mLongitude': -122.0861865, u'mLatitude': 37.391097199999997, u'mTime': 1424917592.0})) speed = 437.21515359
DEBUG:root:currSpeed < 7874.8556394, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 897.65923060979298, u'mLongitude': -122.0863872, u'mLatitude': 37.390850499999999, u'mTime': 1424917635.0})(9), prev_pt (AttrDict({'speed': 437.21515358985135, u'mLongitude': -122.086236, u'mLatitude': 37.3910792, u'mTime': 1424917603.0})) speed = 897.65923061
DEBUG:root:currSpeed < 7874.8556394, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 10087.816091625511, u'mLongitude': -122.0881468, u'mLatitude': 37.388306200000002, u'mTime': 1424917667.0})(10), prev_pt (AttrDict({'speed': 897.65923060979298, u'mLongitude': -122.0863872, u'mLatitude': 37.390850499999999, u'mTime': 1424917635.0})) speed = 10087.8160916
DEBUG:root:currSpeed > 7874.8556394, removing index 10
DEBUG:root:while considering point AttrDict({'speed': 567.15664001378946, u'mLongitude': -122.08765649999999, u'mLatitude': 37.3889706, u'mTime': 1424917818.0})(11), prev_pt (AttrDict({'speed': 897.65923060979298, u'mLongitude': -122.0863872, u'mLatitude': 37.390850499999999, u'mTime': 1424917635.0})) speed = 1296.25536689
DEBUG:root:currSpeed < 7874.8556394, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 6401.6091501579158, u'mLongitude': -122.08552829999999, u'mLatitude': 37.390066500000003, u'mTime': 1424917853.0})(12), prev_pt (AttrDict({'speed': 567.15664001378946, u'mLongitude': -122.08765649999999, u'mLatitude': 37.3889706, u'mTime': 1424917818.0})) speed = 6401.60915016
DEBUG:root:currSpeed < 7874.8556394, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 1031.8110666027171, u'mLongitude': -122.0852246, u'mLatitude': 37.389909899999999, u'mTime': 1424917884.0})(13), prev_pt (AttrDict({'speed': 6401.6091501579158, u'mLongitude': -122.08552829999999, u'mLatitude': 37.390066500000003, u'mTime': 1424917853.0})) speed = 1031.8110666
DEBUG:root:currSpeed < 7874.8556394, retaining index 13
DEBUG:root:while considering point AttrDict({'speed': 3537.1481949737904, u'mLongitude': -122.08455619999999, u'mLatitude': 37.389004399999997, u'mTime': 1424917917.0})(14), prev_pt (AttrDict({'speed': 1031.8110666027171, u'mLongitude': -122.0852246, u'mLatitude': 37.389909899999999, u'mTime': 1424917884.0})) speed = 3537.14819497
DEBUG:root:currSpeed < 7874.8556394, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 1454.7323303251023, u'mLongitude': -122.0840779, u'mLatitude': 37.3891025, u'mTime': 1424917947.0})(15), prev_pt (AttrDict({'speed': 3537.1481949737904, u'mLongitude': -122.08455619999999, u'mLatitude': 37.389004399999997, u'mTime': 1424917917.0})) speed = 1454.73233033
DEBUG:root:currSpeed < 7874.8556394, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 428.68902641241641, u'mLongitude': -122.08414070000001, u'mLatitude': 37.389211099999997, u'mTime': 1424917978.0})(16), prev_pt (AttrDict({'speed': 1454.7323303251023, u'mLongitude': -122.0840779, u'mLatitude': 37.3891025, u'mTime': 1424917947.0})) speed = 428.689026412
DEBUG:root:currSpeed < 7874.8556394, retaining index 16
DEBUG:root:while considering point AttrDict({'speed': 2940.625061685585, u'mLongitude': -122.0831314, u'mLatitude': 37.388866800000002, u'mTime': 1424918011.0})(17), prev_pt (AttrDict({'speed': 428.68902641241641, u'mLongitude': -122.08414070000001, u'mLatitude': 37.389211099999997, u'mTime': 1424917978.0})) speed = 2940.62506169
DEBUG:root:currSpeed < 7874.8556394, retaining index 17
DEBUG:root:while considering point AttrDict({'speed': 1242.0549595857694, u'mLongitude': -122.0827622, u'mLatitude': 37.388704799999999, u'mTime': 1424918041.0})(18), prev_pt (AttrDict({'speed': 2940.625061685585, u'mLongitude': -122.0831314, u'mLatitude': 37.388866800000002, u'mTime': 1424918011.0})) speed = 1242.05495959
DEBUG:root:currSpeed < 7874.8556394, retaining index 18
DEBUG:root:while considering point AttrDict({'speed': 4232.9425187174711, u'mLongitude': -122.0821261, u'mLatitude': 37.389771199999998, u'mTime': 1424918072.0})(19), prev_pt (AttrDict({'speed': 1242.0549595857694, u'mLongitude': -122.0827622, u'mLatitude': 37.388704799999999, u'mTime': 1424918041.0})) speed = 4232.94251872
DEBUG:root:currSpeed < 7874.8556394, retaining index 19
DEBUG:root:while considering point AttrDict({'speed': 236.96951444184015, u'mLongitude': -122.0820609, u'mLatitude': 37.389812200000001, u'mTime': 1424918103.0})(20), prev_pt (AttrDict({'speed': 4232.9425187174711, u'mLongitude': -122.0821261, u'mLatitude': 37.389771199999998, u'mTime': 1424918072.0})) speed = 236.969514442
DEBUG:root:currSpeed < 7874.8556394, retaining index 20
DEBUG:root:while considering point AttrDict({'speed': 359.66105716975375, u'mLongitude': -122.0819479, u'mLatitude': 37.389800299999997, u'mTime': 1424918131.0})(21), prev_pt (AttrDict({'speed': 236.96951444184015, u'mLongitude': -122.0820609, u'mLatitude': 37.389812200000001, u'mTime': 1424918103.0})) speed = 359.66105717
DEBUG:root:currSpeed < 7874.8556394, retaining index 21
DEBUG:root:while considering point AttrDict({'speed': 1557.8353078179189, u'mLongitude': -122.0817266, u'mLatitude': 37.389387900000003, u'mTime': 1424918163.0})(22), prev_pt (AttrDict({'speed': 359.66105716975375, u'mLongitude': -122.0819479, u'mLatitude': 37.389800299999997, u'mTime': 1424918131.0})) speed = 1557.83530782
DEBUG:root:currSpeed < 7874.8556394, retaining index 22
DEBUG:root:while considering point AttrDict({'speed': 388.3823425697077, u'mLongitude': -122.0817364, u'mLatitude': 37.389265899999998, u'mTime': 1424918198.0})(23), prev_pt (AttrDict({'speed': 1557.8353078179189, u'mLongitude': -122.0817266, u'mLatitude': 37.389387900000003, u'mTime': 1424918163.0})) speed = 388.38234257
DEBUG:root:currSpeed < 7874.8556394, retaining index 23
DEBUG:root:while considering point AttrDict({'speed': 630.89130260644231, u'mLongitude': -122.08170579999999, u'mLatitude': 37.3894114, u'mTime': 1424918224.0})(24), prev_pt (AttrDict({'speed': 388.3823425697077, u'mLongitude': -122.0817364, u'mLatitude': 37.389265899999998, u'mTime': 1424918198.0})) speed = 630.891302606
DEBUG:root:currSpeed < 7874.8556394, retaining index 24
DEBUG:root:while considering point AttrDict({'speed': 183.93778234854466, u'mLongitude': -122.08165820000001, u'mLatitude': 37.389457399999998, u'mTime': 1424918260.0})(25), prev_pt (AttrDict({'speed': 630.89130260644231, u'mLongitude': -122.08170579999999, u'mLatitude': 37.3894114, u'mTime': 1424918224.0})) speed = 183.937782349
DEBUG:root:currSpeed < 7874.8556394, retaining index 25
DEBUG:root:while considering point AttrDict({'speed': 214.46185712256917, u'mLongitude': -122.0816481, u'mLatitude': 37.389407900000002, u'mTime': 1424918286.0})(26), prev_pt (AttrDict({'speed': 183.93778234854466, u'mLongitude': -122.08165820000001, u'mLatitude': 37.389457399999998, u'mTime': 1424918260.0})) speed = 214.461857123
DEBUG:root:currSpeed < 7874.8556394, retaining index 26
DEBUG:root:while considering point AttrDict({'speed': 321.73148840626448, u'mLongitude': -122.08169839999999, u'mLatitude': 37.389327600000001, u'mTime': 1424918317.0})(27), prev_pt (AttrDict({'speed': 214.46185712256917, u'mLongitude': -122.0816481, u'mLatitude': 37.389407900000002, u'mTime': 1424918286.0})) speed = 321.731488406
DEBUG:root:currSpeed < 7874.8556394, retaining index 27
INFO:root:Filtering complete, removed indices = [ 0 1 4 5 6 7 8 9 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27]
filtered list size went from (31, 8) to (28, 8)
filtering points Int64Index([11, 12, 13], dtype='int64')
DEBUG:root:quartile values are 0.25 374.021700
0.75 2249.230185
Name: speed, dtype: float64
DEBUG:root:iqr 1875.20848488
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
25 26 27]
filtered list size went from (31, 8) to (28, 8)
while considering point 1, speed = 985.017044959
currSpeed < 7874, retaining index 1 in existing quality segment
while considering point 2, speed = 11222.5769964
currSpeed > 7874, starting new quality segment at index 2
while considering point 3, speed = 1435.29458962
currSpeed < 7874, retaining index 3 in existing quality segment
while considering point 4, speed = 10597.0030983
currSpeed > 7874, starting new quality segment at index 4
while considering point 5, speed = 270.707745222
currSpeed < 7874, retaining index 5 in existing quality segment
while considering point 6, speed = 320.031851986
currSpeed < 7874, retaining index 6 in existing quality segment
while considering point 7, speed = 1354.12044221
currSpeed < 7874, retaining index 7 in existing quality segment
while considering point 8, speed = 437.21515359
currSpeed < 7874, retaining index 8 in existing quality segment
while considering point 9, speed = 897.65923061
currSpeed < 7874, retaining index 9 in existing quality segment
while considering point 10, speed = 10087.8160916
currSpeed > 7874, starting new quality segment at index 10
while considering point 11, speed = 567.156640014
currSpeed < 7874, retaining index 11 in existing quality segment
while considering point 12, speed = 6401.60915016
currSpeed < 7874, retaining index 12 in existing quality segment
while considering point 13, speed = 1031.8110666
currSpeed < 7874, retaining index 13 in existing quality segment
while considering point 14, speed = 3537.14819497
currSpeed < 7874, retaining index 14 in existing quality segment
while considering point 15, speed = 1454.73233033
currSpeed < 7874, retaining index 15 in existing quality segment
while considering point 16, speed = 428.689026412
currSpeed < 7874, retaining index 16 in existing quality segment
while considering point 17, speed = 2940.62506169
currSpeed < 7874, retaining index 17 in existing quality segment
while considering point 18, speed = 1242.05495959
currSpeed < 7874, retaining index 18 in existing quality segment
while considering point 19, speed = 4232.94251872
currSpeed < 7874, retaining index 19 in existing quality segment
while considering point 20, speed = 236.969514442
currSpeed < 7874, retaining index 20 in existing quality segment
while considering point 21, speed = 359.66105717
currSpeed < 7874, retaining index 21 in existing quality segment
while considering point 22, speed = 1557.83530782
currSpeed < 7874, retaining index 22 in existing quality segment
while considering point 23, speed = 388.38234257
currSpeed < 7874, retaining index 23 in existing quality segment
while considering point 24, speed = 630.891302606
currSpeed < 7874, retaining index 24 in existing quality segment
while considering point 25, speed = 183.937782349
currSpeed < 7874, retaining index 25 in existing quality segment
while considering point 26, speed = 214.461857123
currSpeed < 7874, retaining index 26 in existing quality segment
while considering point 27, speed = 321.731488406
currSpeed < 7874, retaining index 27 in existing quality segment
Number of quality segments is 4
Considering segments [1] and [2, 3]
About to compare curr_segment duration 12.0 with last segment duration 0.0
prev segment [1] is shorter, cut it
Comparing distance 331.335406921 with speed 7874.8556394 * time 40.0 = 314994.225576
Considering segments [2, 3] and [4, 5, 6, 7, 8, 9]
About to compare curr_segment duration 131.0 with last segment duration 12.0
prev segment [2, 3] is shorter, cut it
Comparing distance 331.281807573 with speed 7874.8556394 * time 161.0 = 1267851.75794
Comparing distance 314.178301437 with speed 7874.8556394 * time 173.0 = 1362350.02562
Considering segments [4, 5, 6, 7, 8, 9] and [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27]
About to compare curr_segment duration 650.0 with last segment duration 131.0
prev segment [4, 5, 6, 7, 8, 9] is shorter, cut it
Comparing distance 447.515183938 with speed 7874.8556394 * time 682.0 = 5370651.54607
Comparing distance 445.690846979 with speed 7874.8556394 * time 714.0 = 5622646.92653
Comparing distance 442.647564364 with speed 7874.8556394 * time 725.0 = 5709270.33856
Comparing distance 439.476983427 with speed 7874.8556394 * time 756.0 = 5953390.86338
Comparing distance 445.302914496 with speed 7874.8556394 * time 776.0 = 6110887.97617
Comparing distance 435.761052471 with speed 7874.8556394 * time 813.0 = 6402257.63483
filtering points Int64Index([11, 12, 13], dtype='int64')
DEBUG:root:Found 1 potential outliers, list = [2]
DEBUG:root:Only one candidate, cluster centers are [array([2])]
DEBUG:root:Considering candidate cluster center [2]
DEBUG:root:lowRange = max(-3, 0) = 0 and highRange = max(7, 28) = 7
DEBUG:root:Area size = 8, index = Int64Index([0, 1, 2, 3, 4, 5, 6, 7], dtype='int64') with size 8
DEBUG:root:In area 0 - 7, deleted 2 points through ransac filtering
DEBUG:root:Retain mask is of size 8
DEBUG:root:with speed df shape is (28, 9), ransac_mask size = 28
DEBUG:root:filtering done, ransac deleted points = [0]
DEBUG:root:while considering point AttrDict({'speed': 985.01704495911906, u'mLongitude': -122.0863873, u'mLatitude': 37.390851099999999, u'mTime': 1424917434.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -122.08624260000001, u'mLatitude': 37.391090699999999, u'mTime': 1424917404.0})) speed = 985.017044959
DEBUG:root:currSpeed < 11059.9277829, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 11222.576996378815, u'mLongitude': -122.088128, u'mLatitude': 37.388386699999998, u'mTime': 1424917462.0})(2), prev_pt (AttrDict({'speed': 985.01704495911906, u'mLongitude': -122.0863873, u'mLatitude': 37.390851099999999, u'mTime': 1424917434.0})) speed = 11222.5769964
DEBUG:root:currSpeed > 11059.9277829, removing index 2
DEBUG:root:while considering point AttrDict({'speed': 1435.2945896234044, u'mLongitude': -122.0882433, u'mLatitude': 37.388261800000002, u'mTime': 1424917474.0})(3), prev_pt (AttrDict({'speed': 985.01704495911906, u'mLongitude': -122.0863873, u'mLatitude': 37.390851099999999, u'mTime': 1424917434.0})) speed = 8283.38517303
DEBUG:root:currSpeed < 11059.9277829, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 10597.003098293901, u'mLongitude': -122.086327, u'mLatitude': 37.390681700000002, u'mTime': 1424917504.0})(4), prev_pt (AttrDict({'speed': 1435.2945896234044, u'mLongitude': -122.0882433, u'mLatitude': 37.388261800000002, u'mTime': 1424917474.0})) speed = 10597.0030983
DEBUG:root:currSpeed < 11059.9277829, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 270.70774522230408, u'mLongitude': -122.0864162, u'mLatitude': 37.390737299999998, u'mTime': 1424917541.0})(5), prev_pt (AttrDict({'speed': 10597.003098293901, u'mLongitude': -122.086327, u'mLatitude': 37.390681700000002, u'mTime': 1424917504.0})) speed = 270.707745222
DEBUG:root:currSpeed < 11059.9277829, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 320.03185198554195, u'mLongitude': -122.0863439, u'mLatitude': 37.390740999999998, u'mTime': 1424917561.0})(6), prev_pt (AttrDict({'speed': 270.70774522230408, u'mLongitude': -122.0864162, u'mLatitude': 37.390737299999998, u'mTime': 1424917541.0})) speed = 320.031851986
DEBUG:root:currSpeed < 11059.9277829, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 1354.120442205329, u'mLongitude': -122.0861865, u'mLatitude': 37.391097199999997, u'mTime': 1424917592.0})(7), prev_pt (AttrDict({'speed': 320.03185198554195, u'mLongitude': -122.0863439, u'mLatitude': 37.390740999999998, u'mTime': 1424917561.0})) speed = 1354.12044221
DEBUG:root:currSpeed < 11059.9277829, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 437.21515358985135, u'mLongitude': -122.086236, u'mLatitude': 37.3910792, u'mTime': 1424917603.0})(8), prev_pt (AttrDict({'speed': 1354.120442205329, u'mLongitude': -122.0861865, u'mLatitude': 37.391097199999997, u'mTime': 1424917592.0})) speed = 437.21515359
DEBUG:root:currSpeed < 11059.9277829, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 897.65923060979298, u'mLongitude': -122.0863872, u'mLatitude': 37.390850499999999, u'mTime': 1424917635.0})(9), prev_pt (AttrDict({'speed': 437.21515358985135, u'mLongitude': -122.086236, u'mLatitude': 37.3910792, u'mTime': 1424917603.0})) speed = 897.65923061
DEBUG:root:currSpeed < 11059.9277829, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 10087.816091625511, u'mLongitude': -122.0881468, u'mLatitude': 37.388306200000002, u'mTime': 1424917667.0})(10), prev_pt (AttrDict({'speed': 897.65923060979298, u'mLongitude': -122.0863872, u'mLatitude': 37.390850499999999, u'mTime': 1424917635.0})) speed = 10087.8160916
DEBUG:root:currSpeed < 11059.9277829, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 567.15664001378946, u'mLongitude': -122.08765649999999, u'mLatitude': 37.3889706, u'mTime': 1424917818.0})(11), prev_pt (AttrDict({'speed': 10087.816091625511, u'mLongitude': -122.0881468, u'mLatitude': 37.388306200000002, u'mTime': 1424917667.0})) speed = 567.156640014
DEBUG:root:currSpeed < 11059.9277829, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 6401.6091501579158, u'mLongitude': -122.08552829999999, u'mLatitude': 37.390066500000003, u'mTime': 1424917853.0})(12), prev_pt (AttrDict({'speed': 567.15664001378946, u'mLongitude': -122.08765649999999, u'mLatitude': 37.3889706, u'mTime': 1424917818.0})) speed = 6401.60915016
DEBUG:root:currSpeed < 11059.9277829, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 1031.8110666027171, u'mLongitude': -122.0852246, u'mLatitude': 37.389909899999999, u'mTime': 1424917884.0})(13), prev_pt (AttrDict({'speed': 6401.6091501579158, u'mLongitude': -122.08552829999999, u'mLatitude': 37.390066500000003, u'mTime': 1424917853.0})) speed = 1031.8110666
DEBUG:root:currSpeed < 11059.9277829, retaining index 13
DEBUG:root:while considering point AttrDict({'speed': 3537.1481949737904, u'mLongitude': -122.08455619999999, u'mLatitude': 37.389004399999997, u'mTime': 1424917917.0})(14), prev_pt (AttrDict({'speed': 1031.8110666027171, u'mLongitude': -122.0852246, u'mLatitude': 37.389909899999999, u'mTime': 1424917884.0})) speed = 3537.14819497
DEBUG:root:currSpeed < 11059.9277829, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 1454.7323303251023, u'mLongitude': -122.0840779, u'mLatitude': 37.3891025, u'mTime': 1424917947.0})(15), prev_pt (AttrDict({'speed': 3537.1481949737904, u'mLongitude': -122.08455619999999, u'mLatitude': 37.389004399999997, u'mTime': 1424917917.0})) speed = 1454.73233033
DEBUG:root:currSpeed < 11059.9277829, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 428.68902641241641, u'mLongitude': -122.08414070000001, u'mLatitude': 37.389211099999997, u'mTime': 1424917978.0})(16), prev_pt (AttrDict({'speed': 1454.7323303251023, u'mLongitude': -122.0840779, u'mLatitude': 37.3891025, u'mTime': 1424917947.0})) speed = 428.689026412
DEBUG:root:currSpeed < 11059.9277829, retaining index 16
DEBUG:root:while considering point AttrDict({'speed': 2940.625061685585, u'mLongitude': -122.0831314, u'mLatitude': 37.388866800000002, u'mTime': 1424918011.0})(17), prev_pt (AttrDict({'speed': 428.68902641241641, u'mLongitude': -122.08414070000001, u'mLatitude': 37.389211099999997, u'mTime': 1424917978.0})) speed = 2940.62506169
DEBUG:root:currSpeed < 11059.9277829, retaining index 17
DEBUG:root:while considering point AttrDict({'speed': 1242.0549595857694, u'mLongitude': -122.0827622, u'mLatitude': 37.388704799999999, u'mTime': 1424918041.0})(18), prev_pt (AttrDict({'speed': 2940.625061685585, u'mLongitude': -122.0831314, u'mLatitude': 37.388866800000002, u'mTime': 1424918011.0})) speed = 1242.05495959
DEBUG:root:currSpeed < 11059.9277829, retaining index 18
DEBUG:root:while considering point AttrDict({'speed': 4232.9425187174711, u'mLongitude': -122.0821261, u'mLatitude': 37.389771199999998, u'mTime': 1424918072.0})(19), prev_pt (AttrDict({'speed': 1242.0549595857694, u'mLongitude': -122.0827622, u'mLatitude': 37.388704799999999, u'mTime': 1424918041.0})) speed = 4232.94251872
DEBUG:root:currSpeed < 11059.9277829, retaining index 19
DEBUG:root:while considering point AttrDict({'speed': 236.96951444184015, u'mLongitude': -122.0820609, u'mLatitude': 37.389812200000001, u'mTime': 1424918103.0})(20), prev_pt (AttrDict({'speed': 4232.9425187174711, u'mLongitude': -122.0821261, u'mLatitude': 37.389771199999998, u'mTime': 1424918072.0})) speed = 236.969514442
DEBUG:root:currSpeed < 11059.9277829, retaining index 20
DEBUG:root:while considering point AttrDict({'speed': 359.66105716975375, u'mLongitude': -122.0819479, u'mLatitude': 37.389800299999997, u'mTime': 1424918131.0})(21), prev_pt (AttrDict({'speed': 236.96951444184015, u'mLongitude': -122.0820609, u'mLatitude': 37.389812200000001, u'mTime': 1424918103.0})) speed = 359.66105717
DEBUG:root:currSpeed < 11059.9277829, retaining index 21
DEBUG:root:while considering point AttrDict({'speed': 1557.8353078179189, u'mLongitude': -122.0817266, u'mLatitude': 37.389387900000003, u'mTime': 1424918163.0})(22), prev_pt (AttrDict({'speed': 359.66105716975375, u'mLongitude': -122.0819479, u'mLatitude': 37.389800299999997, u'mTime': 1424918131.0})) speed = 1557.83530782
DEBUG:root:currSpeed < 11059.9277829, retaining index 22
DEBUG:root:while considering point AttrDict({'speed': 388.3823425697077, u'mLongitude': -122.0817364, u'mLatitude': 37.389265899999998, u'mTime': 1424918198.0})(23), prev_pt (AttrDict({'speed': 1557.8353078179189, u'mLongitude': -122.0817266, u'mLatitude': 37.389387900000003, u'mTime': 1424918163.0})) speed = 388.38234257
DEBUG:root:currSpeed < 11059.9277829, retaining index 23
DEBUG:root:while considering point AttrDict({'speed': 630.89130260644231, u'mLongitude': -122.08170579999999, u'mLatitude': 37.3894114, u'mTime': 1424918224.0})(24), prev_pt (AttrDict({'speed': 388.3823425697077, u'mLongitude': -122.0817364, u'mLatitude': 37.389265899999998, u'mTime': 1424918198.0})) speed = 630.891302606
DEBUG:root:currSpeed < 11059.9277829, retaining index 24
DEBUG:root:while considering point AttrDict({'speed': 183.93778234854466, u'mLongitude': -122.08165820000001, u'mLatitude': 37.389457399999998, u'mTime': 1424918260.0})(25), prev_pt (AttrDict({'speed': 630.89130260644231, u'mLongitude': -122.08170579999999, u'mLatitude': 37.3894114, u'mTime': 1424918224.0})) speed = 183.937782349
DEBUG:root:currSpeed < 11059.9277829, retaining index 25
DEBUG:root:while considering point AttrDict({'speed': 214.46185712256917, u'mLongitude': -122.0816481, u'mLatitude': 37.389407900000002, u'mTime': 1424918286.0})(26), prev_pt (AttrDict({'speed': 183.93778234854466, u'mLongitude': -122.08165820000001, u'mLatitude': 37.389457399999998, u'mTime': 1424918260.0})) speed = 214.461857123
DEBUG:root:currSpeed < 11059.9277829, retaining index 26
DEBUG:root:while considering point AttrDict({'speed': 321.73148840626448, u'mLongitude': -122.08169839999999, u'mLatitude': 37.389327600000001, u'mTime': 1424918317.0})(27), prev_pt (AttrDict({'speed': 214.46185712256917, u'mLongitude': -122.0816481, u'mLatitude': 37.389407900000002, u'mTime': 1424918286.0})) speed = 321.731488406
DEBUG:root:currSpeed < 11059.9277829, retaining index 27
INFO:root:Filtering complete, removed indices = [ 0 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
26 27]
filtered list size went from (31, 8) to (28, 8)
filtering points Int64Index([11, 12, 13], dtype='int64')
filtered list size went from (31, 8) to (28, 8)
filtering points Int64Index([11, 12, 13], dtype='int64')
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
25 26 27]
filtered list size went from (31, 8) to (28, 8)
while considering point 1, speed = 985.017044959
currSpeed < 11059, retaining index 1 in existing quality segment
while considering point 2, speed = 11222.5769964
currSpeed > 11059, starting new quality segment at index 2
while considering point 3, speed = 1435.29458962
currSpeed < 11059, retaining index 3 in existing quality segment
while considering point 4, speed = 10597.0030983
currSpeed < 11059, retaining index 4 in existing quality segment
while considering point 5, speed = 270.707745222
currSpeed < 11059, retaining index 5 in existing quality segment
while considering point 6, speed = 320.031851986
currSpeed < 11059, retaining index 6 in existing quality segment
while considering point 7, speed = 1354.12044221
currSpeed < 11059, retaining index 7 in existing quality segment
while considering point 8, speed = 437.21515359
currSpeed < 11059, retaining index 8 in existing quality segment
while considering point 9, speed = 897.65923061
currSpeed < 11059, retaining index 9 in existing quality segment
while considering point 10, speed = 10087.8160916
currSpeed < 11059, retaining index 10 in existing quality segment
while considering point 11, speed = 567.156640014
currSpeed < 11059, retaining index 11 in existing quality segment
while considering point 12, speed = 6401.60915016
currSpeed < 11059, retaining index 12 in existing quality segment
while considering point 13, speed = 1031.8110666
currSpeed < 11059, retaining index 13 in existing quality segment
while considering point 14, speed = 3537.14819497
currSpeed < 11059, retaining index 14 in existing quality segment
while considering point 15, speed = 1454.73233033
currSpeed < 11059, retaining index 15 in existing quality segment
while considering point 16, speed = 428.689026412
currSpeed < 11059, retaining index 16 in existing quality segment
while considering point 17, speed = 2940.62506169
currSpeed < 11059, retaining index 17 in existing quality segment
while considering point 18, speed = 1242.05495959
currSpeed < 11059, retaining index 18 in existing quality segment
while considering point 19, speed = 4232.94251872
currSpeed < 11059, retaining index 19 in existing quality segment
while considering point 20, speed = 236.969514442
currSpeed < 11059, retaining index 20 in existing quality segment
while considering point 21, speed = 359.66105717
currSpeed < 11059, retaining index 21 in existing quality segment
while considering point 22, speed = 1557.83530782
currSpeed < 11059, retaining index 22 in existing quality segment
while considering point 23, speed = 388.38234257
currSpeed < 11059, retaining index 23 in existing quality segment
while considering point 24, speed = 630.891302606
currSpeed < 11059, retaining index 24 in existing quality segment
while considering point 25, speed = 183.937782349
currSpeed < 11059, retaining index 25 in existing quality segment
while considering point 26, speed = 214.461857123
currSpeed < 11059, retaining index 26 in existing quality segment
while considering point 27, speed = 321.731488406
currSpeed < 11059, retaining index 27 in existing quality segment
Number of quality segments is 2
Considering segments [1] and [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27]
About to compare curr_segment duration 855.0 with last segment duration 0.0
prev segment [1] is shorter, cut it
Comparing distance 447.548609501 with speed 11059.9277829 * time 883.0 = 9765916.23228
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1422502409.0}}, {'data.mTime': {'$lt': 1422503001.0}}], 'user_id': u'20150128T193329-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([], dtype='int64')
filtered list size went from (19, 8) to (19, 8)
filtering points Int64Index([], dtype='int64')
DEBUG:root:quartile values are 0.25 196.128196
0.75 2241.685251
Name: speed, dtype: float64
DEBUG:root:iqr 2045.55705522
DEBUG:root:Found 1 potential outliers, list = [2]
DEBUG:root:Only one candidate, cluster centers are [array([2])]
DEBUG:root:Considering candidate cluster center [2]
DEBUG:root:lowRange = max(-3, 0) = 0 and highRange = max(7, 19) = 7
DEBUG:root:Area size = 8, index = Int64Index([0, 1, 2, 3, 4, 5, 6, 7], dtype='int64') with size 8
DEBUG:root:In area 0 - 7, deleted 4 points through ransac filtering
DEBUG:root:Retain mask is of size 8
DEBUG:root:with speed df shape is (19, 9), ransac_mask size = 19
DEBUG:root:filtering done, ransac deleted points = [0]
filtered list size went from (19, 8) to (19, 8)
filtering points Int64Index([], dtype='int64')
DEBUG:root:quartile values are 0.25 196.128196
0.75 2241.685251
Name: speed, dtype: float64
DEBUG:root:iqr 2045.55705522
DEBUG:root:while considering point AttrDict({'speed': 194.71304603274868, u'mLongitude': -122.08769030000001, u'mLatitude': 37.388860800000003, u'mTime': 1422502446.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -122.087695, u'mLatitude': 37.388808400000002, u'mTime': 1422502416.0})) speed = 194.713046033
DEBUG:root:currSpeed < 8378.35641698, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 10122.752545460824, u'mLongitude': -122.0843832, u'mLatitude': 37.390118700000002, u'mTime': 1422502478.0})(2), prev_pt (AttrDict({'speed': 194.71304603274868, u'mLongitude': -122.08769030000001, u'mLatitude': 37.388860800000003, u'mTime': 1422502446.0})) speed = 10122.7525455
DEBUG:root:currSpeed > 8378.35641698, removing index 2
DEBUG:root:while considering point AttrDict({'speed': 4477.7790031038921, u'mLongitude': -122.0851361, u'mLatitude': 37.389023000000002, u'mTime': 1422502509.0})(3), prev_pt (AttrDict({'speed': 194.71304603274868, u'mLongitude': -122.08769030000001, u'mLatitude': 37.388860800000003, u'mTime': 1422502446.0})) speed = 3593.29904958
DEBUG:root:currSpeed < 8378.35641698, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 2705.9243963195504, u'mLongitude': -122.0842729, u'mLatitude': 37.3893372, u'mTime': 1422502540.0})(4), prev_pt (AttrDict({'speed': 4477.7790031038921, u'mLongitude': -122.0851361, u'mLatitude': 37.389023000000002, u'mTime': 1422502509.0})) speed = 2705.92439632
DEBUG:root:currSpeed < 8378.35641698, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 748.26061189862287, u'mLongitude': -122.0841298, u'mLatitude': 37.389162300000002, u'mTime': 1422502571.0})(5), prev_pt (AttrDict({'speed': 2705.9243963195504, u'mLongitude': -122.0842729, u'mLatitude': 37.3893372, u'mTime': 1422502540.0})) speed = 748.260611899
DEBUG:root:currSpeed < 8378.35641698, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 557.99981721963286, u'mLongitude': -122.08395, u'mLatitude': 37.389114800000002, u'mTime': 1422502601.0})(6), prev_pt (AttrDict({'speed': 748.26061189862287, u'mLongitude': -122.0841298, u'mLatitude': 37.389162300000002, u'mTime': 1422502571.0})) speed = 557.99981722
DEBUG:root:currSpeed < 8378.35641698, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 2330.7122563486573, u'mLongitude': -122.0831349, u'mLatitude': 37.389061900000002, u'mTime': 1422502632.0})(7), prev_pt (AttrDict({'speed': 557.99981721963286, u'mLongitude': -122.08395, u'mLatitude': 37.389114800000002, u'mTime': 1422502601.0})) speed = 2330.71225635
DEBUG:root:currSpeed < 8378.35641698, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 200.37364629038524, u'mLongitude': -122.0830698, u'mLatitude': 37.389082999999999, u'mTime': 1422502663.0})(8), prev_pt (AttrDict({'speed': 2330.7122563486573, u'mLongitude': -122.0831349, u'mLatitude': 37.389061900000002, u'mTime': 1422502632.0})) speed = 200.37364629
DEBUG:root:currSpeed < 8378.35641698, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 1974.6042362286225, u'mLongitude': -122.08354780000001, u'mLatitude': 37.389456600000003, u'mTime': 1422502693.0})(9), prev_pt (AttrDict({'speed': 200.37364629038524, u'mLongitude': -122.0830698, u'mLatitude': 37.389082999999999, u'mTime': 1422502663.0})) speed = 1974.60423623
DEBUG:root:currSpeed < 8378.35641698, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 5522.3133789838603, u'mLongitude': -122.0815832, u'mLatitude': 37.389755200000003, u'mTime': 1422502725.0})(10), prev_pt (AttrDict({'speed': 1974.6042362286225, u'mLongitude': -122.08354780000001, u'mLatitude': 37.389456600000003, u'mTime': 1422502693.0})) speed = 5522.31337898
DEBUG:root:currSpeed < 8378.35641698, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 76.680821266134842, u'mLongitude': -122.08161, u'mLatitude': 37.389753300000002, u'mTime': 1422502756.0})(11), prev_pt (AttrDict({'speed': 5522.3133789838603, u'mLongitude': -122.0815832, u'mLatitude': 37.389755200000003, u'mTime': 1422502725.0})) speed = 76.6808212661
DEBUG:root:currSpeed < 8378.35641698, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 1678.2342897486794, u'mLongitude': -122.0817413, u'mLatitude': 37.389312699999998, u'mTime': 1422502786.0})(12), prev_pt (AttrDict({'speed': 76.680821266134842, u'mLongitude': -122.08161, u'mLatitude': 37.389753300000002, u'mTime': 1422502756.0})) speed = 1678.23428975
DEBUG:root:currSpeed < 8378.35641698, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 9.7873534967183193, u'mLongitude': -122.0817399, u'mLatitude': 37.3893147, u'mTime': 1422502812.0})(13), prev_pt (AttrDict({'speed': 1678.2342897486794, u'mLongitude': -122.0817413, u'mLatitude': 37.389312699999998, u'mTime': 1422502786.0})) speed = 9.78735349672
DEBUG:root:currSpeed < 8378.35641698, retaining index 13
DEBUG:root:while considering point AttrDict({'speed': 423.97665871407912, u'mLongitude': -122.0816743, u'mLatitude': 37.389433400000001, u'mTime': 1422502846.0})(14), prev_pt (AttrDict({'speed': 9.7873534967183193, u'mLongitude': -122.0817399, u'mLatitude': 37.3893147, u'mTime': 1422502812.0})) speed = 423.976658714
DEBUG:root:currSpeed < 8378.35641698, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 420.15945809243556, u'mLongitude': -122.08172329999999, u'mLatitude': 37.389343199999999, u'mTime': 1422502872.0})(15), prev_pt (AttrDict({'speed': 423.97665871407912, u'mLongitude': -122.0816743, u'mLatitude': 37.389433400000001, u'mTime': 1422502846.0})) speed = 420.159458092
DEBUG:root:currSpeed < 8378.35641698, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 91.150476656332657, u'mLongitude': -122.081738, u'mLatitude': 37.389318799999998, u'mTime': 1422502905.0})(16), prev_pt (AttrDict({'speed': 420.15945809243556, u'mLongitude': -122.08172329999999, u'mLatitude': 37.389343199999999, u'mTime': 1422502872.0})) speed = 91.1504766563
DEBUG:root:currSpeed < 8378.35641698, retaining index 16
DEBUG:root:while considering point AttrDict({'speed': 73.9510683862853, u'mLongitude': -122.0817486, u'mLatitude': 37.3892971, u'mTime': 1422502940.0})(17), prev_pt (AttrDict({'speed': 91.150476656332657, u'mLongitude': -122.081738, u'mLatitude': 37.389318799999998, u'mTime': 1422502905.0})) speed = 73.9510683863
DEBUG:root:currSpeed < 8378.35641698, retaining index 17
DEBUG:root:while considering point AttrDict({'speed': 228.62444644380602, u'mLongitude': -122.0817205, u'mLatitude': 37.389356800000002, u'mTime': 1422502971.0})(18), prev_pt (AttrDict({'speed': 73.9510683862853, u'mLongitude': -122.0817486, u'mLatitude': 37.3892971, u'mTime': 1422502940.0})) speed = 228.624446444
DEBUG:root:currSpeed < 8378.35641698, retaining index 18
INFO:root:Filtering complete, removed indices = [ 0 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18]
filtered list size went from (19, 8) to (19, 8)
filtering points Int64Index([], dtype='int64')
DEBUG:root:quartile values are 0.25 196.128196
0.75 2241.685251
Name: speed, dtype: float64
DEBUG:root:iqr 2045.55705522
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18]
DEBUG:root:Found 1 potential outliers, list = [2]
DEBUG:root:Only one candidate, cluster centers are [array([2])]
DEBUG:root:Considering candidate cluster center [2]
DEBUG:root:lowRange = max(-3, 0) = 0 and highRange = max(7, 19) = 7
DEBUG:root:Area size = 8, index = Int64Index([0, 1, 2, 3, 4, 5, 6, 7], dtype='int64') with size 8
DEBUG:root:In area 0 - 7, deleted 4 points through ransac filtering
DEBUG:root:Retain mask is of size 8
DEBUG:root:with speed df shape is (19, 9), ransac_mask size = 19
DEBUG:root:filtering done, ransac deleted points = [0]
filtered list size went from (19, 8) to (19, 8)
while considering point 1, speed = 194.713046033
currSpeed < 8378, retaining index 1 in existing quality segment
while considering point 2, speed = 10122.7525455
currSpeed > 8378, starting new quality segment at index 2
while considering point 3, speed = 4477.7790031
currSpeed < 8378, retaining index 3 in existing quality segment
while considering point 4, speed = 2705.92439632
currSpeed < 8378, retaining index 4 in existing quality segment
while considering point 5, speed = 748.260611899
currSpeed < 8378, retaining index 5 in existing quality segment
while considering point 6, speed = 557.99981722
currSpeed < 8378, retaining index 6 in existing quality segment
while considering point 7, speed = 2330.71225635
currSpeed < 8378, retaining index 7 in existing quality segment
while considering point 8, speed = 200.37364629
currSpeed < 8378, retaining index 8 in existing quality segment
while considering point 9, speed = 1974.60423623
currSpeed < 8378, retaining index 9 in existing quality segment
while considering point 10, speed = 5522.31337898
currSpeed < 8378, retaining index 10 in existing quality segment
while considering point 11, speed = 76.6808212661
currSpeed < 8378, retaining index 11 in existing quality segment
while considering point 12, speed = 1678.23428975
currSpeed < 8378, retaining index 12 in existing quality segment
while considering point 13, speed = 9.78735349672
currSpeed < 8378, retaining index 13 in existing quality segment
while considering point 14, speed = 423.976658714
currSpeed < 8378, retaining index 14 in existing quality segment
while considering point 15, speed = 420.159458092
currSpeed < 8378, retaining index 15 in existing quality segment
while considering point 16, speed = 91.1504766563
currSpeed < 8378, retaining index 16 in existing quality segment
while considering point 17, speed = 73.9510683863
currSpeed < 8378, retaining index 17 in existing quality segment
while considering point 18, speed = 228.624446444
currSpeed < 8378, retaining index 18 in existing quality segment
Number of quality segments is 2
Considering segments [1] and [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
About to compare curr_segment duration 493.0 with last segment duration 0.0
prev segment [1] is shorter, cut it
Comparing distance 530.294016939 with speed 8378.35641698 * time 525.0 = 4398637.11892
filtering points Int64Index([], dtype='int64')
filtered list size went from (19, 8) to (19, 8)
filtering points Int64Index([], dtype='int64')
DEBUG:root:while considering point AttrDict({'speed': 194.71304603274868, u'mLongitude': -122.08769030000001, u'mLatitude': 37.388860800000003, u'mTime': 1422502446.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -122.087695, u'mLatitude': 37.388808400000002, u'mTime': 1422502416.0})) speed = 194.713046033
DEBUG:root:currSpeed < 9340.67788716, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 10122.752545460824, u'mLongitude': -122.0843832, u'mLatitude': 37.390118700000002, u'mTime': 1422502478.0})(2), prev_pt (AttrDict({'speed': 194.71304603274868, u'mLongitude': -122.08769030000001, u'mLatitude': 37.388860800000003, u'mTime': 1422502446.0})) speed = 10122.7525455
DEBUG:root:currSpeed > 9340.67788716, removing index 2
DEBUG:root:while considering point AttrDict({'speed': 4477.7790031038921, u'mLongitude': -122.0851361, u'mLatitude': 37.389023000000002, u'mTime': 1422502509.0})(3), prev_pt (AttrDict({'speed': 194.71304603274868, u'mLongitude': -122.08769030000001, u'mLatitude': 37.388860800000003, u'mTime': 1422502446.0})) speed = 3593.29904958
DEBUG:root:currSpeed < 9340.67788716, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 2705.9243963195504, u'mLongitude': -122.0842729, u'mLatitude': 37.3893372, u'mTime': 1422502540.0})(4), prev_pt (AttrDict({'speed': 4477.7790031038921, u'mLongitude': -122.0851361, u'mLatitude': 37.389023000000002, u'mTime': 1422502509.0})) speed = 2705.92439632
DEBUG:root:currSpeed < 9340.67788716, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 748.26061189862287, u'mLongitude': -122.0841298, u'mLatitude': 37.389162300000002, u'mTime': 1422502571.0})(5), prev_pt (AttrDict({'speed': 2705.9243963195504, u'mLongitude': -122.0842729, u'mLatitude': 37.3893372, u'mTime': 1422502540.0})) speed = 748.260611899
DEBUG:root:currSpeed < 9340.67788716, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 557.99981721963286, u'mLongitude': -122.08395, u'mLatitude': 37.389114800000002, u'mTime': 1422502601.0})(6), prev_pt (AttrDict({'speed': 748.26061189862287, u'mLongitude': -122.0841298, u'mLatitude': 37.389162300000002, u'mTime': 1422502571.0})) speed = 557.99981722
DEBUG:root:currSpeed < 9340.67788716, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 2330.7122563486573, u'mLongitude': -122.0831349, u'mLatitude': 37.389061900000002, u'mTime': 1422502632.0})(7), prev_pt (AttrDict({'speed': 557.99981721963286, u'mLongitude': -122.08395, u'mLatitude': 37.389114800000002, u'mTime': 1422502601.0})) speed = 2330.71225635
DEBUG:root:currSpeed < 9340.67788716, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 200.37364629038524, u'mLongitude': -122.0830698, u'mLatitude': 37.389082999999999, u'mTime': 1422502663.0})(8), prev_pt (AttrDict({'speed': 2330.7122563486573, u'mLongitude': -122.0831349, u'mLatitude': 37.389061900000002, u'mTime': 1422502632.0})) speed = 200.37364629
DEBUG:root:currSpeed < 9340.67788716, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 1974.6042362286225, u'mLongitude': -122.08354780000001, u'mLatitude': 37.389456600000003, u'mTime': 1422502693.0})(9), prev_pt (AttrDict({'speed': 200.37364629038524, u'mLongitude': -122.0830698, u'mLatitude': 37.389082999999999, u'mTime': 1422502663.0})) speed = 1974.60423623
DEBUG:root:currSpeed < 9340.67788716, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 5522.3133789838603, u'mLongitude': -122.0815832, u'mLatitude': 37.389755200000003, u'mTime': 1422502725.0})(10), prev_pt (AttrDict({'speed': 1974.6042362286225, u'mLongitude': -122.08354780000001, u'mLatitude': 37.389456600000003, u'mTime': 1422502693.0})) speed = 5522.31337898
DEBUG:root:currSpeed < 9340.67788716, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 76.680821266134842, u'mLongitude': -122.08161, u'mLatitude': 37.389753300000002, u'mTime': 1422502756.0})(11), prev_pt (AttrDict({'speed': 5522.3133789838603, u'mLongitude': -122.0815832, u'mLatitude': 37.389755200000003, u'mTime': 1422502725.0})) speed = 76.6808212661
DEBUG:root:currSpeed < 9340.67788716, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 1678.2342897486794, u'mLongitude': -122.0817413, u'mLatitude': 37.389312699999998, u'mTime': 1422502786.0})(12), prev_pt (AttrDict({'speed': 76.680821266134842, u'mLongitude': -122.08161, u'mLatitude': 37.389753300000002, u'mTime': 1422502756.0})) speed = 1678.23428975
DEBUG:root:currSpeed < 9340.67788716, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 9.7873534967183193, u'mLongitude': -122.0817399, u'mLatitude': 37.3893147, u'mTime': 1422502812.0})(13), prev_pt (AttrDict({'speed': 1678.2342897486794, u'mLongitude': -122.0817413, u'mLatitude': 37.389312699999998, u'mTime': 1422502786.0})) speed = 9.78735349672
DEBUG:root:currSpeed < 9340.67788716, retaining index 13
DEBUG:root:while considering point AttrDict({'speed': 423.97665871407912, u'mLongitude': -122.0816743, u'mLatitude': 37.389433400000001, u'mTime': 1422502846.0})(14), prev_pt (AttrDict({'speed': 9.7873534967183193, u'mLongitude': -122.0817399, u'mLatitude': 37.3893147, u'mTime': 1422502812.0})) speed = 423.976658714
DEBUG:root:currSpeed < 9340.67788716, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 420.15945809243556, u'mLongitude': -122.08172329999999, u'mLatitude': 37.389343199999999, u'mTime': 1422502872.0})(15), prev_pt (AttrDict({'speed': 423.97665871407912, u'mLongitude': -122.0816743, u'mLatitude': 37.389433400000001, u'mTime': 1422502846.0})) speed = 420.159458092
DEBUG:root:currSpeed < 9340.67788716, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 91.150476656332657, u'mLongitude': -122.081738, u'mLatitude': 37.389318799999998, u'mTime': 1422502905.0})(16), prev_pt (AttrDict({'speed': 420.15945809243556, u'mLongitude': -122.08172329999999, u'mLatitude': 37.389343199999999, u'mTime': 1422502872.0})) speed = 91.1504766563
DEBUG:root:currSpeed < 9340.67788716, retaining index 16
DEBUG:root:while considering point AttrDict({'speed': 73.9510683862853, u'mLongitude': -122.0817486, u'mLatitude': 37.3892971, u'mTime': 1422502940.0})(17), prev_pt (AttrDict({'speed': 91.150476656332657, u'mLongitude': -122.081738, u'mLatitude': 37.389318799999998, u'mTime': 1422502905.0})) speed = 73.9510683863
DEBUG:root:currSpeed < 9340.67788716, retaining index 17
DEBUG:root:while considering point AttrDict({'speed': 228.62444644380602, u'mLongitude': -122.0817205, u'mLatitude': 37.389356800000002, u'mTime': 1422502971.0})(18), prev_pt (AttrDict({'speed': 73.9510683862853, u'mLongitude': -122.0817486, u'mLatitude': 37.3892971, u'mTime': 1422502940.0})) speed = 228.624446444
DEBUG:root:currSpeed < 9340.67788716, retaining index 18
INFO:root:Filtering complete, removed indices = [ 0 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18]
filtered list size went from (19, 8) to (19, 8)
filtering points Int64Index([], dtype='int64')
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18]
filtered list size went from (19, 8) to (19, 8)
while considering point 1, speed = 194.713046033
currSpeed < 9340, retaining index 1 in existing quality segment
while considering point 2, speed = 10122.7525455
currSpeed > 9340, starting new quality segment at index 2
while considering point 3, speed = 4477.7790031
currSpeed < 9340, retaining index 3 in existing quality segment
while considering point 4, speed = 2705.92439632
currSpeed < 9340, retaining index 4 in existing quality segment
while considering point 5, speed = 748.260611899
currSpeed < 9340, retaining index 5 in existing quality segment
while considering point 6, speed = 557.99981722
currSpeed < 9340, retaining index 6 in existing quality segment
while considering point 7, speed = 2330.71225635
currSpeed < 9340, retaining index 7 in existing quality segment
while considering point 8, speed = 200.37364629
currSpeed < 9340, retaining index 8 in existing quality segment
while considering point 9, speed = 1974.60423623
currSpeed < 9340, retaining index 9 in existing quality segment
while considering point 10, speed = 5522.31337898
currSpeed < 9340, retaining index 10 in existing quality segment
while considering point 11, speed = 76.6808212661
currSpeed < 9340, retaining index 11 in existing quality segment
while considering point 12, speed = 1678.23428975
currSpeed < 9340, retaining index 12 in existing quality segment
while considering point 13, speed = 9.78735349672
currSpeed < 9340, retaining index 13 in existing quality segment
while considering point 14, speed = 423.976658714
currSpeed < 9340, retaining index 14 in existing quality segment
while considering point 15, speed = 420.159458092
currSpeed < 9340, retaining index 15 in existing quality segment
while considering point 16, speed = 91.1504766563
currSpeed < 9340, retaining index 16 in existing quality segment
while considering point 17, speed = 73.9510683863
currSpeed < 9340, retaining index 17 in existing quality segment
while considering point 18, speed = 228.624446444
currSpeed < 9340, retaining index 18 in existing quality segment
Number of quality segments is 2
Considering segments [1] and [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
About to compare curr_segment duration 493.0 with last segment duration 0.0
prev segment [1] is shorter, cut it
Comparing distance 530.294016939 with speed 9340.67788716 * time 525.0 = 4903855.89076
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1422319001.0}}, {'data.mTime': {'$lt': 1422319399.0}}], 'user_id': u'20150126T163641-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([], dtype='int64')
filtered list size went from (13, 8) to (13, 8)
filtering points Int64Index([], dtype='int64')
DEBUG:root:quartile values are 0.25 169.834242
0.75 3129.807660
Name: speed, dtype: float64
DEBUG:root:iqr 2959.97341794
DEBUG:root:Found 0 potential outliers, list = []
INFO:root:No potential outliers ([]), so no areas to consider
DEBUG:root:with speed df shape is (13, 9), ransac_mask size = 13
DEBUG:root:filtering done, ransac deleted points = [0]
DEBUG:root:quartile values are 0.25 169.834242
0.75 3129.807660
Name: speed, dtype: float64
DEBUG:root:iqr 2959.97341794
DEBUG:root:while considering point AttrDict({'speed': 7911.7124972139191, u'mLongitude': -122.0840833, u'mLatitude': 37.389457800000002, u'mTime': 1422319033.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -122.0819529, u'mLatitude': 37.390366399999998, u'mTime': 1422319006.0})) speed = 7911.71249721
DEBUG:root:currSpeed < 12009.7279142, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 589.69229450165085, u'mLongitude': -122.0839498, u'mLatitude': 37.389597000000002, u'mTime': 1422319066.0})(2), prev_pt (AttrDict({'speed': 7911.7124972139191, u'mLongitude': -122.0840833, u'mLatitude': 37.389457800000002, u'mTime': 1422319033.0})) speed = 589.692294502
DEBUG:root:currSpeed < 12009.7279142, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 11041.703144733645, u'mLongitude': -122.0875382, u'mLatitude': 37.3887334, u'mTime': 1422319096.0})(3), prev_pt (AttrDict({'speed': 589.69229450165085, u'mLongitude': -122.0839498, u'mLatitude': 37.389597000000002, u'mTime': 1422319066.0})) speed = 11041.7031447
DEBUG:root:currSpeed < 12009.7279142, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 7739.3643429478834, u'mLongitude': -122.086431, u'mLatitude': 37.390627100000003, u'mTime': 1422319126.0})(4), prev_pt (AttrDict({'speed': 11041.703144733645, u'mLongitude': -122.0875382, u'mLatitude': 37.3887334, u'mTime': 1422319096.0})) speed = 7739.36434295
DEBUG:root:currSpeed < 12009.7279142, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 190.03343820137789, u'mLongitude': -122.08648479999999, u'mLatitude': 37.3905958, u'mTime': 1422319157.0})(5), prev_pt (AttrDict({'speed': 7739.3643429478834, u'mLongitude': -122.086431, u'mLatitude': 37.390627100000003, u'mTime': 1422319126.0})) speed = 190.033438201
DEBUG:root:currSpeed < 12009.7279142, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 1593.2887662631874, u'mLongitude': -122.0861633, u'mLatitude': 37.390959199999998, u'mTime': 1422319188.0})(6), prev_pt (AttrDict({'speed': 190.03343820137789, u'mLongitude': -122.08648479999999, u'mLatitude': 37.3905958, u'mTime': 1422319157.0})) speed = 1593.28876626
DEBUG:root:currSpeed < 12009.7279142, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 105.80693839249196, u'mLongitude': -122.08618749999999, u'mLatitude': 37.3909381, u'mTime': 1422319218.0})(7), prev_pt (AttrDict({'speed': 1593.2887662631874, u'mLongitude': -122.0861633, u'mLatitude': 37.390959199999998, u'mTime': 1422319188.0})) speed = 105.806938392
DEBUG:root:currSpeed < 12009.7279142, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 240.52452067941925, u'mLongitude': -122.0862681, u'mLatitude': 37.390948600000002, u'mTime': 1422319248.0})(8), prev_pt (AttrDict({'speed': 105.80693839249196, u'mLongitude': -122.08618749999999, u'mLatitude': 37.3909381, u'mTime': 1422319218.0})) speed = 240.524520679
DEBUG:root:currSpeed < 12009.7279142, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 62.760290830947625, u'mLongitude': -122.0862477, u'mLatitude': 37.390953500000002, u'mTime': 1422319278.0})(9), prev_pt (AttrDict({'speed': 240.52452067941925, u'mLongitude': -122.0862681, u'mLatitude': 37.390948600000002, u'mTime': 1422319248.0})) speed = 62.7602908309
DEBUG:root:currSpeed < 12009.7279142, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 250.7149364687713, u'mLongitude': -122.08625069999999, u'mLatitude': 37.391021100000003, u'mTime': 1422319308.0})(10), prev_pt (AttrDict({'speed': 62.760290830947625, u'mLongitude': -122.0862477, u'mLatitude': 37.390953500000002, u'mTime': 1422319278.0})) speed = 250.714936469
DEBUG:root:currSpeed < 12009.7279142, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 109.23665539195116, u'mLongitude': -122.0862166, u'mLatitude': 37.391009500000003, u'mTime': 1422319338.0})(11), prev_pt (AttrDict({'speed': 250.7149364687713, u'mLongitude': -122.08625069999999, u'mLatitude': 37.391021100000003, u'mTime': 1422319308.0})) speed = 109.236655392
DEBUG:root:currSpeed < 12009.7279142, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 252.64081175715671, u'mLongitude': -122.0862728, u'mLatitude': 37.390957999999998, u'mTime': 1422319368.0})(12), prev_pt (AttrDict({'speed': 109.23665539195116, u'mLongitude': -122.0862166, u'mLatitude': 37.391009500000003, u'mTime': 1422319338.0})) speed = 252.640811757
DEBUG:root:currSpeed < 12009.7279142, retaining index 12
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12]
filtered list size went from (13, 8) to (13, 8)
filtering points Int64Index([], dtype='int64')
filtered list size went from (13, 8) to (13, 8)
filtering points Int64Index([], dtype='int64')
DEBUG:root:quartile values are 0.25 169.834242
0.75 3129.807660
Name: speed, dtype: float64
DEBUG:root:iqr 2959.97341794
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12]
DEBUG:root:Found 1 potential outliers, list = [3]
DEBUG:root:Only one candidate, cluster centers are [array([3])]
DEBUG:root:Considering candidate cluster center [3]
DEBUG:root:lowRange = max(-2, 0) = 0 and highRange = max(8, 13) = 8
DEBUG:root:Area size = 9, index = Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8], dtype='int64') with size 9
DEBUG:root:In area 0 - 8, deleted 3 points through ransac filtering
DEBUG:root:Retain mask is of size 9
DEBUG:root:with speed df shape is (13, 9), ransac_mask size = 13
DEBUG:root:filtering done, ransac deleted points = [0]
filtered list size went from (13, 8) to (13, 8)
while considering point 1, speed = 7911.71249721
currSpeed < 12009, retaining index 1 in existing quality segment
while considering point 2, speed = 589.692294502
currSpeed < 12009, retaining index 2 in existing quality segment
while considering point 3, speed = 11041.7031447
currSpeed < 12009, retaining index 3 in existing quality segment
while considering point 4, speed = 7739.36434295
currSpeed < 12009, retaining index 4 in existing quality segment
while considering point 5, speed = 190.033438201
currSpeed < 12009, retaining index 5 in existing quality segment
while considering point 6, speed = 1593.28876626
currSpeed < 12009, retaining index 6 in existing quality segment
while considering point 7, speed = 105.806938392
currSpeed < 12009, retaining index 7 in existing quality segment
while considering point 8, speed = 240.524520679
currSpeed < 12009, retaining index 8 in existing quality segment
while considering point 9, speed = 62.7602908309
currSpeed < 12009, retaining index 9 in existing quality segment
while considering point 10, speed = 250.714936469
currSpeed < 12009, retaining index 10 in existing quality segment
while considering point 11, speed = 109.236655392
currSpeed < 12009, retaining index 11 in existing quality segment
while considering point 12, speed = 252.640811757
currSpeed < 12009, retaining index 12 in existing quality segment
Number of quality segments is 1
filtering points Int64Index([], dtype='int64')
filtered list size went from (13, 8) to (13, 8)
filtering points Int64Index([], dtype='int64')
DEBUG:root:while considering point AttrDict({'speed': 7911.7124972139191, u'mLongitude': -122.0840833, u'mLatitude': 37.389457800000002, u'mTime': 1422319033.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -122.0819529, u'mLatitude': 37.390366399999998, u'mTime': 1422319006.0})) speed = 7911.71249721
DEBUG:root:currSpeed < 10697.4041735, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 589.69229450165085, u'mLongitude': -122.0839498, u'mLatitude': 37.389597000000002, u'mTime': 1422319066.0})(2), prev_pt (AttrDict({'speed': 7911.7124972139191, u'mLongitude': -122.0840833, u'mLatitude': 37.389457800000002, u'mTime': 1422319033.0})) speed = 589.692294502
DEBUG:root:currSpeed < 10697.4041735, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 11041.703144733645, u'mLongitude': -122.0875382, u'mLatitude': 37.3887334, u'mTime': 1422319096.0})(3), prev_pt (AttrDict({'speed': 589.69229450165085, u'mLongitude': -122.0839498, u'mLatitude': 37.389597000000002, u'mTime': 1422319066.0})) speed = 11041.7031447
DEBUG:root:currSpeed > 10697.4041735, removing index 3
DEBUG:root:while considering point AttrDict({'speed': 7739.3643429478834, u'mLongitude': -122.086431, u'mLatitude': 37.390627100000003, u'mTime': 1422319126.0})(4), prev_pt (AttrDict({'speed': 589.69229450165085, u'mLongitude': -122.0839498, u'mLatitude': 37.389597000000002, u'mTime': 1422319066.0})) speed = 4122.12380556
DEBUG:root:currSpeed < 10697.4041735, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 190.03343820137789, u'mLongitude': -122.08648479999999, u'mLatitude': 37.3905958, u'mTime': 1422319157.0})(5), prev_pt (AttrDict({'speed': 7739.3643429478834, u'mLongitude': -122.086431, u'mLatitude': 37.390627100000003, u'mTime': 1422319126.0})) speed = 190.033438201
DEBUG:root:currSpeed < 10697.4041735, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 1593.2887662631874, u'mLongitude': -122.0861633, u'mLatitude': 37.390959199999998, u'mTime': 1422319188.0})(6), prev_pt (AttrDict({'speed': 190.03343820137789, u'mLongitude': -122.08648479999999, u'mLatitude': 37.3905958, u'mTime': 1422319157.0})) speed = 1593.28876626
DEBUG:root:currSpeed < 10697.4041735, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 105.80693839249196, u'mLongitude': -122.08618749999999, u'mLatitude': 37.3909381, u'mTime': 1422319218.0})(7), prev_pt (AttrDict({'speed': 1593.2887662631874, u'mLongitude': -122.0861633, u'mLatitude': 37.390959199999998, u'mTime': 1422319188.0})) speed = 105.806938392
DEBUG:root:currSpeed < 10697.4041735, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 240.52452067941925, u'mLongitude': -122.0862681, u'mLatitude': 37.390948600000002, u'mTime': 1422319248.0})(8), prev_pt (AttrDict({'speed': 105.80693839249196, u'mLongitude': -122.08618749999999, u'mLatitude': 37.3909381, u'mTime': 1422319218.0})) speed = 240.524520679
DEBUG:root:currSpeed < 10697.4041735, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 62.760290830947625, u'mLongitude': -122.0862477, u'mLatitude': 37.390953500000002, u'mTime': 1422319278.0})(9), prev_pt (AttrDict({'speed': 240.52452067941925, u'mLongitude': -122.0862681, u'mLatitude': 37.390948600000002, u'mTime': 1422319248.0})) speed = 62.7602908309
DEBUG:root:currSpeed < 10697.4041735, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 250.7149364687713, u'mLongitude': -122.08625069999999, u'mLatitude': 37.391021100000003, u'mTime': 1422319308.0})(10), prev_pt (AttrDict({'speed': 62.760290830947625, u'mLongitude': -122.0862477, u'mLatitude': 37.390953500000002, u'mTime': 1422319278.0})) speed = 250.714936469
DEBUG:root:currSpeed < 10697.4041735, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 109.23665539195116, u'mLongitude': -122.0862166, u'mLatitude': 37.391009500000003, u'mTime': 1422319338.0})(11), prev_pt (AttrDict({'speed': 250.7149364687713, u'mLongitude': -122.08625069999999, u'mLatitude': 37.391021100000003, u'mTime': 1422319308.0})) speed = 109.236655392
DEBUG:root:currSpeed < 10697.4041735, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 252.64081175715671, u'mLongitude': -122.0862728, u'mLatitude': 37.390957999999998, u'mTime': 1422319368.0})(12), prev_pt (AttrDict({'speed': 109.23665539195116, u'mLongitude': -122.0862166, u'mLatitude': 37.391009500000003, u'mTime': 1422319338.0})) speed = 252.640811757
DEBUG:root:currSpeed < 10697.4041735, retaining index 12
INFO:root:Filtering complete, removed indices = [ 0 1 2 4 5 6 7 8 9 10 11 12]
filtered list size went from (13, 8) to (13, 8)
filtering points Int64Index([], dtype='int64')
filtered list size went from (13, 8) to (13, 8)
while considering point 1, speed = 7911.71249721
currSpeed < 10697, retaining index 1 in existing quality segment
while considering point 2, speed = 589.692294502
currSpeed < 10697, retaining index 2 in existing quality segment
while considering point 3, speed = 11041.7031447
currSpeed > 10697, starting new quality segment at index 3
while considering point 4, speed = 7739.36434295
currSpeed < 10697, retaining index 4 in existing quality segment
while considering point 5, speed = 190.033438201
currSpeed < 10697, retaining index 5 in existing quality segment
while considering point 6, speed = 1593.28876626
currSpeed < 10697, retaining index 6 in existing quality segment
while considering point 7, speed = 105.806938392
currSpeed < 10697, retaining index 7 in existing quality segment
while considering point 8, speed = 240.524520679
currSpeed < 10697, retaining index 8 in existing quality segment
while considering point 9, speed = 62.7602908309
currSpeed < 10697, retaining index 9 in existing quality segment
while considering point 10, speed = 250.714936469
currSpeed < 10697, retaining index 10 in existing quality segment
while considering point 11, speed = 109.236655392
currSpeed < 10697, retaining index 11 in existing quality segment
while considering point 12, speed = 252.640811757
currSpeed < 10697, retaining index 12 in existing quality segment
Number of quality segments is 2
Considering segments [1, 2] and [3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
About to compare curr_segment duration 272.0 with last segment duration 33.0
prev segment [1, 2] is shorter, cut it
Comparing distance 254.992991772 with speed 10697.4041735 * time 302.0 = 3230616.0604
Comparing distance 255.429086262 with speed 10697.4041735 * time 335.0 = 3583630.39812
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12]
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1422509287.0}}, {'data.mTime': {'$lt': 1422509795.0}}], 'user_id': u'20150128T212807-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([], dtype='int64')
DEBUG:root:quartile values are 0.25 197.575183
0.75 1699.470673
Name: speed, dtype: float64
DEBUG:root:iqr 1501.8954907
DEBUG:root:Found 2 potential outliers, list = [6 7]
DEBUG:root:Found 2 clusters with centers [[6]
[7]]
DEBUG:root:Considering candidate cluster center [6]
DEBUG:root:lowRange = max(1, 0) = 1 and highRange = max(11, 16) = 11
DEBUG:root:Considering candidate cluster center [7]
DEBUG:root:lowRange = max(2, 0) = 2 and highRange = max(12, 16) = 12
DEBUG:root:Area size = 11, index = Int64Index([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], dtype='int64') with size 11
DEBUG:root:In area 1 - 11, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:Area size = 11, index = Int64Index([2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], dtype='int64') with size 11
DEBUG:root:In area 2 - 12, deleted 4 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:with speed df shape is (16, 9), ransac_mask size = 16
DEBUG:root:filtering done, ransac deleted points = [0]
filtered list size went from (16, 8) to (16, 8)
filtering points Int64Index([], dtype='int64')
filtered list size went from (16, 8) to (16, 8)
filtering points Int64Index([], dtype='int64')
DEBUG:root:quartile values are 0.25 197.575183
0.75 1699.470673
Name: speed, dtype: float64
DEBUG:root:iqr 1501.8954907
DEBUG:root:while considering point AttrDict({'speed': 2234.1005627954564, u'mLongitude': -122.0840661, u'mLatitude': 37.389199599999998, u'mTime': 1422509335.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -122.08417849999999, u'mLatitude': 37.389795700000001, u'mTime': 1422509305.0})) speed = 2234.1005628
DEBUG:root:currSpeed < 6205.15714535, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 3750.5201196645439, u'mLongitude': -122.08426660000001, u'mLatitude': 37.390233000000002, u'mTime': 1422509366.0})(2), prev_pt (AttrDict({'speed': 2234.1005627954564, u'mLongitude': -122.0840661, u'mLatitude': 37.389199599999998, u'mTime': 1422509335.0})) speed = 3750.52011966
DEBUG:root:currSpeed < 6205.15714535, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 1020.4088442658763, u'mLongitude': -122.08434870000001, u'mLatitude': 37.389956099999999, u'mTime': 1422509397.0})(3), prev_pt (AttrDict({'speed': 3750.5201196645439, u'mLongitude': -122.08426660000001, u'mLatitude': 37.390233000000002, u'mTime': 1422509366.0})) speed = 1020.40884427
DEBUG:root:currSpeed < 6205.15714535, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 724.77034849245308, u'mLongitude': -122.08441550000001, u'mLatitude': 37.390144300000003, u'mTime': 1422509427.0})(4), prev_pt (AttrDict({'speed': 1020.4088442658763, u'mLongitude': -122.08434870000001, u'mLatitude': 37.389956099999999, u'mTime': 1422509397.0})) speed = 724.770348492
DEBUG:root:currSpeed < 6205.15714535, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 807.1005510818336, u'mLongitude': -122.08456200000001, u'mLatitude': 37.3903453, u'mTime': 1422509459.0})(5), prev_pt (AttrDict({'speed': 724.77034849245308, u'mLongitude': -122.08441550000001, u'mLatitude': 37.390144300000003, u'mTime': 1422509427.0})) speed = 807.100551082
DEBUG:root:currSpeed < 6205.15714535, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 10341.030729925111, u'mLongitude': -122.0876974, u'mLatitude': 37.388894200000003, u'mTime': 1422509490.0})(6), prev_pt (AttrDict({'speed': 807.1005510818336, u'mLongitude': -122.08456200000001, u'mLatitude': 37.3903453, u'mTime': 1422509459.0})) speed = 10341.0307299
DEBUG:root:currSpeed > 6205.15714535, removing index 6
DEBUG:root:while considering point AttrDict({'speed': 7098.5534948165669, u'mLongitude': -122.0864462, u'mLatitude': 37.390605399999998, u'mTime': 1422509521.0})(7), prev_pt (AttrDict({'speed': 807.1005510818336, u'mLongitude': -122.08456200000001, u'mLatitude': 37.3903453, u'mTime': 1422509459.0})) speed = 2725.0894343
DEBUG:root:currSpeed < 6205.15714535, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 729.1884468651424, u'mLongitude': -122.086348, u'mLatitude': 37.390785999999999, u'mTime': 1422509551.0})(8), prev_pt (AttrDict({'speed': 7098.5534948165669, u'mLongitude': -122.0864462, u'mLatitude': 37.390605399999998, u'mTime': 1422509521.0})) speed = 729.188446865
DEBUG:root:currSpeed < 6205.15714535, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 1164.8407837071516, u'mLongitude': -122.0861031, u'mLatitude': 37.391046000000003, u'mTime': 1422509582.0})(9), prev_pt (AttrDict({'speed': 729.1884468651424, u'mLongitude': -122.086348, u'mLatitude': 37.390785999999999, u'mTime': 1422509551.0})) speed = 1164.84078371
DEBUG:root:currSpeed < 6205.15714535, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 447.48541914645813, u'mLongitude': -122.086252, u'mLatitude': 37.391006400000002, u'mTime': 1422509613.0})(10), prev_pt (AttrDict({'speed': 1164.8407837071516, u'mLongitude': -122.0861031, u'mLatitude': 37.391046000000003, u'mTime': 1422509582.0})) speed = 447.485419146
DEBUG:root:currSpeed < 6205.15714535, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 194.44707217746728, u'mLongitude': -122.08625069999999, u'mLatitude': 37.390952200000001, u'mTime': 1422509644.0})(11), prev_pt (AttrDict({'speed': 447.48541914645813, u'mLongitude': -122.086252, u'mLatitude': 37.391006400000002, u'mTime': 1422509613.0})) speed = 194.447072177
DEBUG:root:currSpeed < 6205.15714535, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 200.70329292270645, u'mLongitude': -122.08625360000001, u'mLatitude': 37.391006300000001, u'mTime': 1422509674.0})(12), prev_pt (AttrDict({'speed': 194.44707217746728, u'mLongitude': -122.08625069999999, u'mLatitude': 37.390952200000001, u'mTime': 1422509644.0})) speed = 200.703292923
DEBUG:root:currSpeed < 6205.15714535, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 73.318147337505422, u'mLongitude': -122.08623249999999, u'mLatitude': 37.390995799999999, u'mTime': 1422509704.0})(13), prev_pt (AttrDict({'speed': 200.70329292270645, u'mLongitude': -122.08625360000001, u'mLatitude': 37.391006300000001, u'mTime': 1422509674.0})) speed = 73.3181473375
DEBUG:root:currSpeed < 6205.15714535, retaining index 13
DEBUG:root:while considering point AttrDict({'speed': 37.526152980396425, u'mLongitude': -122.0862293, u'mLatitude': 37.390985999999998, u'mTime': 1422509734.0})(14), prev_pt (AttrDict({'speed': 73.318147337505422, u'mLongitude': -122.08623249999999, u'mLatitude': 37.390995799999999, u'mTime': 1422509704.0})) speed = 37.5261529804
DEBUG:root:currSpeed < 6205.15714535, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 59.753660576015783, u'mLongitude': -122.0862501, u'mLatitude': 37.390983900000002, u'mTime': 1422509765.0})(15), prev_pt (AttrDict({'speed': 37.526152980396425, u'mLongitude': -122.0862293, u'mLatitude': 37.390985999999998, u'mTime': 1422509734.0})) speed = 59.753660576
DEBUG:root:currSpeed < 6205.15714535, retaining index 15
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 7 8 9 10 11 12 13 14 15]
filtered list size went from (16, 8) to (16, 8)
filtering points Int64Index([], dtype='int64')
DEBUG:root:quartile values are 0.25 197.575183
0.75 1699.470673
Name: speed, dtype: float64
DEBUG:root:iqr 1501.8954907
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15]
DEBUG:root:Found 1 potential outliers, list = [6]
DEBUG:root:Only one candidate, cluster centers are [array([6])]
DEBUG:root:Considering candidate cluster center [6]
DEBUG:root:lowRange = max(1, 0) = 1 and highRange = max(11, 16) = 11
DEBUG:root:Area size = 11, index = Int64Index([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], dtype='int64') with size 11
DEBUG:root:In area 1 - 11, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:with speed df shape is (16, 9), ransac_mask size = 16
DEBUG:root:filtering done, ransac deleted points = [0]
filtered list size went from (16, 8) to (16, 8)
while considering point 1, speed = 2234.1005628
currSpeed < 6205, retaining index 1 in existing quality segment
while considering point 2, speed = 3750.52011966
currSpeed < 6205, retaining index 2 in existing quality segment
while considering point 3, speed = 1020.40884427
currSpeed < 6205, retaining index 3 in existing quality segment
while considering point 4, speed = 724.770348492
currSpeed < 6205, retaining index 4 in existing quality segment
while considering point 5, speed = 807.100551082
currSpeed < 6205, retaining index 5 in existing quality segment
while considering point 6, speed = 10341.0307299
currSpeed > 6205, starting new quality segment at index 6
while considering point 7, speed = 7098.55349482
currSpeed > 6205, starting new quality segment at index 7
while considering point 8, speed = 729.188446865
currSpeed < 6205, retaining index 8 in existing quality segment
while considering point 9, speed = 1164.84078371
currSpeed < 6205, retaining index 9 in existing quality segment
while considering point 10, speed = 447.485419146
currSpeed < 6205, retaining index 10 in existing quality segment
while considering point 11, speed = 194.447072177
currSpeed < 6205, retaining index 11 in existing quality segment
while considering point 12, speed = 200.703292923
currSpeed < 6205, retaining index 12 in existing quality segment
while considering point 13, speed = 73.3181473375
currSpeed < 6205, retaining index 13 in existing quality segment
while considering point 14, speed = 37.5261529804
currSpeed < 6205, retaining index 14 in existing quality segment
while considering point 15, speed = 59.753660576
currSpeed < 6205, retaining index 15 in existing quality segment
Number of quality segments is 3
Considering segments [1, 2, 3, 4, 5] and [6]
About to compare curr_segment duration 0.0 with last segment duration 124.0
curr segment [6] is shorter, cut it
Comparing distance 320.571952628 with speed 6205.15714535 * time 31.0 = 192359.871506
Considering segments [6] and [7, 8, 9, 10, 11, 12, 13, 14, 15]
About to compare curr_segment duration 244.0 with last segment duration 0.0
prev segment [6] is shorter, cut it
Comparing distance 265.221241331 with speed 6205.15714535 * time 275.0 = 1706418.21497
filtering points Int64Index([], dtype='int64')
filtered list size went from (16, 8) to (16, 8)
filtering points Int64Index([], dtype='int64')
DEBUG:root:while considering point AttrDict({'speed': 2234.1005627954564, u'mLongitude': -122.0840661, u'mLatitude': 37.389199599999998, u'mTime': 1422509335.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -122.08417849999999, u'mLatitude': 37.389795700000001, u'mTime': 1422509305.0})) speed = 2234.1005628
DEBUG:root:currSpeed < 9887.08391701, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 3750.5201196645439, u'mLongitude': -122.08426660000001, u'mLatitude': 37.390233000000002, u'mTime': 1422509366.0})(2), prev_pt (AttrDict({'speed': 2234.1005627954564, u'mLongitude': -122.0840661, u'mLatitude': 37.389199599999998, u'mTime': 1422509335.0})) speed = 3750.52011966
DEBUG:root:currSpeed < 9887.08391701, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 1020.4088442658763, u'mLongitude': -122.08434870000001, u'mLatitude': 37.389956099999999, u'mTime': 1422509397.0})(3), prev_pt (AttrDict({'speed': 3750.5201196645439, u'mLongitude': -122.08426660000001, u'mLatitude': 37.390233000000002, u'mTime': 1422509366.0})) speed = 1020.40884427
DEBUG:root:currSpeed < 9887.08391701, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 724.77034849245308, u'mLongitude': -122.08441550000001, u'mLatitude': 37.390144300000003, u'mTime': 1422509427.0})(4), prev_pt (AttrDict({'speed': 1020.4088442658763, u'mLongitude': -122.08434870000001, u'mLatitude': 37.389956099999999, u'mTime': 1422509397.0})) speed = 724.770348492
DEBUG:root:currSpeed < 9887.08391701, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 807.1005510818336, u'mLongitude': -122.08456200000001, u'mLatitude': 37.3903453, u'mTime': 1422509459.0})(5), prev_pt (AttrDict({'speed': 724.77034849245308, u'mLongitude': -122.08441550000001, u'mLatitude': 37.390144300000003, u'mTime': 1422509427.0})) speed = 807.100551082
DEBUG:root:currSpeed < 9887.08391701, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 10341.030729925111, u'mLongitude': -122.0876974, u'mLatitude': 37.388894200000003, u'mTime': 1422509490.0})(6), prev_pt (AttrDict({'speed': 807.1005510818336, u'mLongitude': -122.08456200000001, u'mLatitude': 37.3903453, u'mTime': 1422509459.0})) speed = 10341.0307299
DEBUG:root:currSpeed > 9887.08391701, removing index 6
DEBUG:root:while considering point AttrDict({'speed': 7098.5534948165669, u'mLongitude': -122.0864462, u'mLatitude': 37.390605399999998, u'mTime': 1422509521.0})(7), prev_pt (AttrDict({'speed': 807.1005510818336, u'mLongitude': -122.08456200000001, u'mLatitude': 37.3903453, u'mTime': 1422509459.0})) speed = 2725.0894343
DEBUG:root:currSpeed < 9887.08391701, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 729.1884468651424, u'mLongitude': -122.086348, u'mLatitude': 37.390785999999999, u'mTime': 1422509551.0})(8), prev_pt (AttrDict({'speed': 7098.5534948165669, u'mLongitude': -122.0864462, u'mLatitude': 37.390605399999998, u'mTime': 1422509521.0})) speed = 729.188446865
DEBUG:root:currSpeed < 9887.08391701, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 1164.8407837071516, u'mLongitude': -122.0861031, u'mLatitude': 37.391046000000003, u'mTime': 1422509582.0})(9), prev_pt (AttrDict({'speed': 729.1884468651424, u'mLongitude': -122.086348, u'mLatitude': 37.390785999999999, u'mTime': 1422509551.0})) speed = 1164.84078371
DEBUG:root:currSpeed < 9887.08391701, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 447.48541914645813, u'mLongitude': -122.086252, u'mLatitude': 37.391006400000002, u'mTime': 1422509613.0})(10), prev_pt (AttrDict({'speed': 1164.8407837071516, u'mLongitude': -122.0861031, u'mLatitude': 37.391046000000003, u'mTime': 1422509582.0})) speed = 447.485419146
DEBUG:root:currSpeed < 9887.08391701, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 194.44707217746728, u'mLongitude': -122.08625069999999, u'mLatitude': 37.390952200000001, u'mTime': 1422509644.0})(11), prev_pt (AttrDict({'speed': 447.48541914645813, u'mLongitude': -122.086252, u'mLatitude': 37.391006400000002, u'mTime': 1422509613.0})) speed = 194.447072177
DEBUG:root:currSpeed < 9887.08391701, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 200.70329292270645, u'mLongitude': -122.08625360000001, u'mLatitude': 37.391006300000001, u'mTime': 1422509674.0})(12), prev_pt (AttrDict({'speed': 194.44707217746728, u'mLongitude': -122.08625069999999, u'mLatitude': 37.390952200000001, u'mTime': 1422509644.0})) speed = 200.703292923
DEBUG:root:currSpeed < 9887.08391701, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 73.318147337505422, u'mLongitude': -122.08623249999999, u'mLatitude': 37.390995799999999, u'mTime': 1422509704.0})(13), prev_pt (AttrDict({'speed': 200.70329292270645, u'mLongitude': -122.08625360000001, u'mLatitude': 37.391006300000001, u'mTime': 1422509674.0})) speed = 73.3181473375
DEBUG:root:currSpeed < 9887.08391701, retaining index 13
DEBUG:root:while considering point AttrDict({'speed': 37.526152980396425, u'mLongitude': -122.0862293, u'mLatitude': 37.390985999999998, u'mTime': 1422509734.0})(14), prev_pt (AttrDict({'speed': 73.318147337505422, u'mLongitude': -122.08623249999999, u'mLatitude': 37.390995799999999, u'mTime': 1422509704.0})) speed = 37.5261529804
DEBUG:root:currSpeed < 9887.08391701, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 59.753660576015783, u'mLongitude': -122.0862501, u'mLatitude': 37.390983900000002, u'mTime': 1422509765.0})(15), prev_pt (AttrDict({'speed': 37.526152980396425, u'mLongitude': -122.0862293, u'mLatitude': 37.390985999999998, u'mTime': 1422509734.0})) speed = 59.753660576
DEBUG:root:currSpeed < 9887.08391701, retaining index 15
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 7 8 9 10 11 12 13 14 15]
filtered list size went from (16, 8) to (16, 8)
filtering points Int64Index([], dtype='int64')
filtered list size went from (16, 8) to (16, 8)
while considering point 1, speed = 2234.1005628
currSpeed < 9887, retaining index 1 in existing quality segment
while considering point 2, speed = 3750.52011966
currSpeed < 9887, retaining index 2 in existing quality segment
while considering point 3, speed = 1020.40884427
currSpeed < 9887, retaining index 3 in existing quality segment
while considering point 4, speed = 724.770348492
currSpeed < 9887, retaining index 4 in existing quality segment
while considering point 5, speed = 807.100551082
currSpeed < 9887, retaining index 5 in existing quality segment
while considering point 6, speed = 10341.0307299
currSpeed > 9887, starting new quality segment at index 6
while considering point 7, speed = 7098.55349482
currSpeed < 9887, retaining index 7 in existing quality segment
while considering point 8, speed = 729.188446865
currSpeed < 9887, retaining index 8 in existing quality segment
while considering point 9, speed = 1164.84078371
currSpeed < 9887, retaining index 9 in existing quality segment
while considering point 10, speed = 447.485419146
currSpeed < 9887, retaining index 10 in existing quality segment
while considering point 11, speed = 194.447072177
currSpeed < 9887, retaining index 11 in existing quality segment
while considering point 12, speed = 200.703292923
currSpeed < 9887, retaining index 12 in existing quality segment
while considering point 13, speed = 73.3181473375
currSpeed < 9887, retaining index 13 in existing quality segment
while considering point 14, speed = 37.5261529804
currSpeed < 9887, retaining index 14 in existing quality segment
while considering point 15, speed = 59.753660576
currSpeed < 9887, retaining index 15 in existing quality segment
Number of quality segments is 2
Considering segments [1, 2, 3, 4, 5] and [6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
About to compare curr_segment duration 275.0 with last segment duration 124.0
prev segment [1, 2, 3, 4, 5] is shorter, cut it
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15]
Comparing distance 165.178806015 with speed 9887.08391701 * time 306.0 = 3025447.67861
Comparing distance 187.044746293 with speed 9887.08391701 * time 338.0 = 3341834.36395
Comparing distance 203.17243064 with speed 9887.08391701 * time 368.0 = 3638446.88146
Comparing distance 194.109879553 with speed 9887.08391701 * time 399.0 = 3944946.48289
Comparing distance 276.755946988 with speed 9887.08391701 * time 430.0 = 4251446.08431
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1423629833.0}}, {'data.mTime': {'$lt': 1423630314.0}}], 'user_id': u'20150210T204353-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([2], dtype='int64')
DEBUG:root:quartile values are 0.25 252.721951
0.75 1888.125387
Name: speed, dtype: float64
DEBUG:root:iqr 1635.4034353
DEBUG:root:Found 0 potential outliers, list = []
INFO:root:No potential outliers ([]), so no areas to consider
DEBUG:root:with speed df shape is (15, 9), ransac_mask size = 15
DEBUG:root:filtering done, ransac deleted points = [0]
filtered list size went from (16, 8) to (15, 8)
filtering points Int64Index([2], dtype='int64')
filtered list size went from (16, 8) to (15, 8)
filtering points Int64Index([2], dtype='int64')
DEBUG:root:quartile values are 0.25 252.721951
0.75 1888.125387
Name: speed, dtype: float64
DEBUG:root:iqr 1635.4034353
DEBUG:root:while considering point AttrDict({'speed': 2488.7784340905609, u'mLongitude': -122.08432670000001, u'mLatitude': 37.390430199999997, u'mTime': 1423629867.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -122.0834899, u'mLatitude': 37.3903362, u'mTime': 1423629837.0})) speed = 2488.77843409
DEBUG:root:currSpeed < 6794.33569265, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 1796.7932341249684, u'mLongitude': -122.084193, u'mLatitude': 37.389466499999997, u'mTime': 1423629927.0})(2), prev_pt (AttrDict({'speed': 2488.7784340905609, u'mLongitude': -122.08432670000001, u'mLatitude': 37.390430199999997, u'mTime': 1423629867.0})) speed = 1796.79323412
DEBUG:root:currSpeed < 6794.33569265, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 2270.3920827063757, u'mLongitude': -122.0848699, u'mLatitude': 37.389759699999999, u'mTime': 1423629957.0})(3), prev_pt (AttrDict({'speed': 1796.7932341249684, u'mLongitude': -122.084193, u'mLatitude': 37.389466499999997, u'mTime': 1423629927.0})) speed = 2270.39208271
DEBUG:root:currSpeed < 6794.33569265, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 774.58407132246418, u'mLongitude': -122.085072, u'mLatitude': 37.389924200000003, u'mTime': 1423629990.0})(4), prev_pt (AttrDict({'speed': 2270.3920827063757, u'mLongitude': -122.0848699, u'mLatitude': 37.389759699999999, u'mTime': 1423629957.0})) speed = 774.584071322
DEBUG:root:currSpeed < 6794.33569265, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 2211.2095548552152, u'mLongitude': -122.0857328, u'mLatitude': 37.390207500000002, u'mTime': 1423630020.0})(5), prev_pt (AttrDict({'speed': 774.58407132246418, u'mLongitude': -122.085072, u'mLatitude': 37.389924200000003, u'mTime': 1423629990.0})) speed = 2211.20955486
DEBUG:root:currSpeed < 6794.33569265, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 609.35801003088795, u'mLongitude': -122.0858887, u'mLatitude': 37.390315600000001, u'mTime': 1423630050.0})(6), prev_pt (AttrDict({'speed': 2211.2095548552152, u'mLongitude': -122.0857328, u'mLatitude': 37.390207500000002, u'mTime': 1423630020.0})) speed = 609.358010031
DEBUG:root:currSpeed < 6794.33569265, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 1918.5694376151907, u'mLongitude': -122.086344, u'mLatitude': 37.390709600000001, u'mTime': 1423630081.0})(7), prev_pt (AttrDict({'speed': 609.35801003088795, u'mLongitude': -122.0858887, u'mLatitude': 37.390315600000001, u'mTime': 1423630050.0})) speed = 1918.56943762
DEBUG:root:currSpeed < 6794.33569265, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 250.66540878306844, u'mLongitude': -122.0863583, u'mLatitude': 37.390673, u'mTime': 1423630098.0})(8), prev_pt (AttrDict({'speed': 1918.5694376151907, u'mLongitude': -122.086344, u'mLatitude': 37.390709600000001, u'mTime': 1423630081.0})) speed = 250.665408783
DEBUG:root:currSpeed < 6794.33569265, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 258.8915794119718, u'mLongitude': -122.08634410000001, u'mLatitude': 37.390749, u'mTime': 1423630131.0})(9), prev_pt (AttrDict({'speed': 250.66540878306844, u'mLongitude': -122.0863583, u'mLatitude': 37.390673, u'mTime': 1423630098.0})) speed = 258.891579412
DEBUG:root:currSpeed < 6794.33569265, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 666.56020606500942, u'mLongitude': -122.08623040000001, u'mLatitude': 37.390904499999998, u'mTime': 1423630161.0})(10), prev_pt (AttrDict({'speed': 258.8915794119718, u'mLongitude': -122.08634410000001, u'mLatitude': 37.390749, u'mTime': 1423630131.0})) speed = 666.560206065
DEBUG:root:currSpeed < 6794.33569265, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 780.43272566075143, u'mLongitude': -122.0861446, u'mLatitude': 37.391118499999997, u'mTime': 1423630193.0})(11), prev_pt (AttrDict({'speed': 666.56020606500942, u'mLongitude': -122.08623040000001, u'mLatitude': 37.390904499999998, u'mTime': 1423630161.0})) speed = 780.432725661
DEBUG:root:currSpeed < 6794.33569265, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 234.41404450400762, u'mLongitude': -122.0862188, u'mLatitude': 37.3910956, u'mTime': 1423630223.0})(12), prev_pt (AttrDict({'speed': 780.43272566075143, u'mLongitude': -122.0861446, u'mLatitude': 37.391118499999997, u'mTime': 1423630193.0})) speed = 234.414044504
DEBUG:root:currSpeed < 6794.33569265, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 65.972216384173834, u'mLongitude': -122.0862114, u'mLatitude': 37.391078800000003, u'mTime': 1423630253.0})(13), prev_pt (AttrDict({'speed': 234.41404450400762, u'mLongitude': -122.0862188, u'mLatitude': 37.3910956, u'mTime': 1423630223.0})) speed = 65.9722163842
DEBUG:root:currSpeed < 6794.33569265, retaining index 13
DEBUG:root:while considering point AttrDict({'speed': 22.410237667645653, u'mLongitude': -122.08621309999999, u'mLatitude': 37.391084900000003, u'mTime': 1423630284.0})(14), prev_pt (AttrDict({'speed': 65.972216384173834, u'mLongitude': -122.0862114, u'mLatitude': 37.391078800000003, u'mTime': 1423630253.0})) speed = 22.4102376676
DEBUG:root:currSpeed < 6794.33569265, retaining index 14
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14]
filtered list size went from (16, 8) to (15, 8)
filtering points Int64Index([2], dtype='int64')
filtered list size went from (16, 8) to (15, 8)
DEBUG:root:quartile values are 0.25 252.721951
0.75 1888.125387
Name: speed, dtype: float64
DEBUG:root:iqr 1635.4034353
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14]
DEBUG:root:Found 1 potential outliers, list = [1]
DEBUG:root:Only one candidate, cluster centers are [array([1])]
DEBUG:root:Considering candidate cluster center [1]
DEBUG:root:lowRange = max(-4, 0) = 0 and highRange = max(6, 15) = 6
DEBUG:root:Area size = 7, index = Int64Index([0, 1, 2, 3, 4, 5, 6], dtype='int64') with size 7
DEBUG:root:In area 0 - 6, deleted 2 points through ransac filtering
DEBUG:root:Retain mask is of size 7
DEBUG:root:with speed df shape is (15, 9), ransac_mask size = 15
DEBUG:root:filtering done, ransac deleted points = [0]
while considering point 1, speed = 2488.77843409
currSpeed < 6794, retaining index 1 in existing quality segment
while considering point 2, speed = 1796.79323412
currSpeed < 6794, retaining index 2 in existing quality segment
while considering point 3, speed = 2270.39208271
currSpeed < 6794, retaining index 3 in existing quality segment
while considering point 4, speed = 774.584071322
currSpeed < 6794, retaining index 4 in existing quality segment
while considering point 5, speed = 2211.20955486
currSpeed < 6794, retaining index 5 in existing quality segment
while considering point 6, speed = 609.358010031
currSpeed < 6794, retaining index 6 in existing quality segment
while considering point 7, speed = 1918.56943762
currSpeed < 6794, retaining index 7 in existing quality segment
while considering point 8, speed = 250.665408783
currSpeed < 6794, retaining index 8 in existing quality segment
while considering point 9, speed = 258.891579412
currSpeed < 6794, retaining index 9 in existing quality segment
while considering point 10, speed = 666.560206065
currSpeed < 6794, retaining index 10 in existing quality segment
while considering point 11, speed = 780.432725661
currSpeed < 6794, retaining index 11 in existing quality segment
while considering point 12, speed = 234.414044504
currSpeed < 6794, retaining index 12 in existing quality segment
while considering point 13, speed = 65.9722163842
currSpeed < 6794, retaining index 13 in existing quality segment
while considering point 14, speed = 22.4102376676
currSpeed < 6794, retaining index 14 in existing quality segment
Number of quality segments is 1
filtering points Int64Index([2], dtype='int64')
filtered list size went from (16, 8) to (15, 8)
filtering points Int64Index([2], dtype='int64')
DEBUG:root:while considering point AttrDict({'speed': 2488.7784340905609, u'mLongitude': -122.08432670000001, u'mLatitude': 37.390430199999997, u'mTime': 1423629867.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -122.0834899, u'mLatitude': 37.3903362, u'mTime': 1423629837.0})) speed = 2488.77843409
DEBUG:root:currSpeed > 2460.38820841, removing index 1
DEBUG:root:while considering point AttrDict({'speed': 1796.7932341249684, u'mLongitude': -122.084193, u'mLatitude': 37.389466499999997, u'mTime': 1423629927.0})(2), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -122.0834899, u'mLatitude': 37.3903362, u'mTime': 1423629837.0})) speed = 1277.08043253
DEBUG:root:currSpeed < 2460.38820841, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 2270.3920827063757, u'mLongitude': -122.0848699, u'mLatitude': 37.389759699999999, u'mTime': 1423629957.0})(3), prev_pt (AttrDict({'speed': 1796.7932341249684, u'mLongitude': -122.084193, u'mLatitude': 37.389466499999997, u'mTime': 1423629927.0})) speed = 2270.39208271
DEBUG:root:currSpeed < 2460.38820841, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 774.58407132246418, u'mLongitude': -122.085072, u'mLatitude': 37.389924200000003, u'mTime': 1423629990.0})(4), prev_pt (AttrDict({'speed': 2270.3920827063757, u'mLongitude': -122.0848699, u'mLatitude': 37.389759699999999, u'mTime': 1423629957.0})) speed = 774.584071322
DEBUG:root:currSpeed < 2460.38820841, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 2211.2095548552152, u'mLongitude': -122.0857328, u'mLatitude': 37.390207500000002, u'mTime': 1423630020.0})(5), prev_pt (AttrDict({'speed': 774.58407132246418, u'mLongitude': -122.085072, u'mLatitude': 37.389924200000003, u'mTime': 1423629990.0})) speed = 2211.20955486
DEBUG:root:currSpeed < 2460.38820841, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 609.35801003088795, u'mLongitude': -122.0858887, u'mLatitude': 37.390315600000001, u'mTime': 1423630050.0})(6), prev_pt (AttrDict({'speed': 2211.2095548552152, u'mLongitude': -122.0857328, u'mLatitude': 37.390207500000002, u'mTime': 1423630020.0})) speed = 609.358010031
DEBUG:root:currSpeed < 2460.38820841, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 1918.5694376151907, u'mLongitude': -122.086344, u'mLatitude': 37.390709600000001, u'mTime': 1423630081.0})(7), prev_pt (AttrDict({'speed': 609.35801003088795, u'mLongitude': -122.0858887, u'mLatitude': 37.390315600000001, u'mTime': 1423630050.0})) speed = 1918.56943762
DEBUG:root:currSpeed < 2460.38820841, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 250.66540878306844, u'mLongitude': -122.0863583, u'mLatitude': 37.390673, u'mTime': 1423630098.0})(8), prev_pt (AttrDict({'speed': 1918.5694376151907, u'mLongitude': -122.086344, u'mLatitude': 37.390709600000001, u'mTime': 1423630081.0})) speed = 250.665408783
DEBUG:root:currSpeed < 2460.38820841, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 258.8915794119718, u'mLongitude': -122.08634410000001, u'mLatitude': 37.390749, u'mTime': 1423630131.0})(9), prev_pt (AttrDict({'speed': 250.66540878306844, u'mLongitude': -122.0863583, u'mLatitude': 37.390673, u'mTime': 1423630098.0})) speed = 258.891579412
DEBUG:root:currSpeed < 2460.38820841, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 666.56020606500942, u'mLongitude': -122.08623040000001, u'mLatitude': 37.390904499999998, u'mTime': 1423630161.0})(10), prev_pt (AttrDict({'speed': 258.8915794119718, u'mLongitude': -122.08634410000001, u'mLatitude': 37.390749, u'mTime': 1423630131.0})) speed = 666.560206065
DEBUG:root:currSpeed < 2460.38820841, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 780.43272566075143, u'mLongitude': -122.0861446, u'mLatitude': 37.391118499999997, u'mTime': 1423630193.0})(11), prev_pt (AttrDict({'speed': 666.56020606500942, u'mLongitude': -122.08623040000001, u'mLatitude': 37.390904499999998, u'mTime': 1423630161.0})) speed = 780.432725661
DEBUG:root:currSpeed < 2460.38820841, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 234.41404450400762, u'mLongitude': -122.0862188, u'mLatitude': 37.3910956, u'mTime': 1423630223.0})(12), prev_pt (AttrDict({'speed': 780.43272566075143, u'mLongitude': -122.0861446, u'mLatitude': 37.391118499999997, u'mTime': 1423630193.0})) speed = 234.414044504
DEBUG:root:currSpeed < 2460.38820841, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 65.972216384173834, u'mLongitude': -122.0862114, u'mLatitude': 37.391078800000003, u'mTime': 1423630253.0})(13), prev_pt (AttrDict({'speed': 234.41404450400762, u'mLongitude': -122.0862188, u'mLatitude': 37.3910956, u'mTime': 1423630223.0})) speed = 65.9722163842
DEBUG:root:currSpeed < 2460.38820841, retaining index 13
DEBUG:root:while considering point AttrDict({'speed': 22.410237667645653, u'mLongitude': -122.08621309999999, u'mLatitude': 37.391084900000003, u'mTime': 1423630284.0})(14), prev_pt (AttrDict({'speed': 65.972216384173834, u'mLongitude': -122.0862114, u'mLatitude': 37.391078800000003, u'mTime': 1423630253.0})) speed = 22.4102376676
DEBUG:root:currSpeed < 2460.38820841, retaining index 14
INFO:root:Filtering complete, removed indices = [ 0 2 3 4 5 6 7 8 9 10 11 12 13 14]
INFO:root:len(last_segment) = 0, len(curr_segment) = 14, skipping
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14]
filtered list size went from (16, 8) to (15, 8)
filtering points Int64Index([2], dtype='int64')
filtered list size went from (16, 8) to (15, 8)
while considering point 1, speed = 2488.77843409
currSpeed > 2460, starting new quality segment at index 1
while considering point 2, speed = 1796.79323412
currSpeed < 2460, retaining index 2 in existing quality segment
while considering point 3, speed = 2270.39208271
currSpeed < 2460, retaining index 3 in existing quality segment
while considering point 4, speed = 774.584071322
currSpeed < 2460, retaining index 4 in existing quality segment
while considering point 5, speed = 2211.20955486
currSpeed < 2460, retaining index 5 in existing quality segment
while considering point 6, speed = 609.358010031
currSpeed < 2460, retaining index 6 in existing quality segment
while considering point 7, speed = 1918.56943762
currSpeed < 2460, retaining index 7 in existing quality segment
while considering point 8, speed = 250.665408783
currSpeed < 2460, retaining index 8 in existing quality segment
while considering point 9, speed = 258.891579412
currSpeed < 2460, retaining index 9 in existing quality segment
while considering point 10, speed = 666.560206065
currSpeed < 2460, retaining index 10 in existing quality segment
while considering point 11, speed = 780.432725661
currSpeed < 2460, retaining index 11 in existing quality segment
while considering point 12, speed = 234.414044504
currSpeed < 2460, retaining index 12 in existing quality segment
while considering point 13, speed = 65.9722163842
currSpeed < 2460, retaining index 13 in existing quality segment
while considering point 14, speed = 22.4102376676
currSpeed < 2460, retaining index 14 in existing quality segment
Number of quality segments is 2
Considering segments [] and [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1424283565.0}}, {'data.mTime': {'$lt': 1424284097.0}}], 'user_id': u'20150218T101925-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([0, 2], dtype='int64')
DEBUG:root:quartile values are 0.25 443.125128
0.75 1599.236112
Name: speed, dtype: float64
DEBUG:root:iqr 1156.11098397
DEBUG:root:Found 0 potential outliers, list = []
INFO:root:No potential outliers ([]), so no areas to consider
DEBUG:root:with speed df shape is (15, 9), ransac_mask size = 15
DEBUG:root:filtering done, ransac deleted points = [0]
filtered list size went from (17, 8) to (15, 8)
filtering points Int64Index([0, 2], dtype='int64')
filtered list size went from (17, 8) to (15, 8)
filtering points Int64Index([0, 2], dtype='int64')
DEBUG:root:quartile values are 0.25 443.125128
0.75 1599.236112
Name: speed, dtype: float64
DEBUG:root:iqr 1156.11098397
DEBUG:root:while considering point AttrDict({'speed': 1714.9111414262063, u'mLongitude': -122.0844764, u'mLatitude': 37.389205199999999, u'mTime': 1424283663.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -122.08479629999999, u'mLatitude': 37.390127, u'mTime': 1424283601.0})) speed = 1714.91114143
DEBUG:root:currSpeed < 5067.56906422, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 1158.2364653367522, u'mLongitude': -122.0840846, u'mLatitude': 37.389119399999998, u'mTime': 1424283694.0})(2), prev_pt (AttrDict({'speed': 1714.9111414262063, u'mLongitude': -122.0844764, u'mLatitude': 37.389205199999999, u'mTime': 1424283663.0})) speed = 1158.23646534
DEBUG:root:currSpeed < 5067.56906422, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 353.66292526104058, u'mLongitude': -122.0839608, u'mLatitude': 37.389112599999997, u'mTime': 1424283725.0})(3), prev_pt (AttrDict({'speed': 1158.2364653367522, u'mLongitude': -122.0840846, u'mLatitude': 37.389119399999998, u'mTime': 1424283694.0})) speed = 353.662925261
DEBUG:root:currSpeed < 5067.56906422, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 1252.2110250065632, u'mLongitude': -122.0835682, u'mLatitude': 37.388910600000003, u'mTime': 1424283758.0})(4), prev_pt (AttrDict({'speed': 353.66292526104058, u'mLongitude': -122.0839608, u'mLatitude': 37.389112599999997, u'mTime': 1424283725.0})) speed = 1252.21102501
DEBUG:root:currSpeed < 5067.56906422, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 2137.8331164399965, u'mLongitude': -122.0828456, u'mLatitude': 37.388689499999998, u'mTime': 1424283790.0})(5), prev_pt (AttrDict({'speed': 1252.2110250065632, u'mLongitude': -122.0835682, u'mLatitude': 37.388910600000003, u'mTime': 1424283758.0})) speed = 2137.83311644
DEBUG:root:currSpeed < 5067.56906422, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 3270.6306420100191, u'mLongitude': -122.0823149, u'mLatitude': 37.389530999999998, u'mTime': 1424283822.0})(6), prev_pt (AttrDict({'speed': 2137.8331164399965, u'mLongitude': -122.0828456, u'mLatitude': 37.388689499999998, u'mTime': 1424283790.0})) speed = 3270.63064201
DEBUG:root:currSpeed < 5067.56906422, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 1967.4602106908915, u'mLongitude': -122.08172, u'mLatitude': 37.389809300000003, u'mTime': 1424283853.0})(7), prev_pt (AttrDict({'speed': 3270.6306420100191, u'mLongitude': -122.0823149, u'mLatitude': 37.389530999999998, u'mTime': 1424283822.0})) speed = 1967.46021069
DEBUG:root:currSpeed < 5067.56906422, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 469.07609397285199, u'mLongitude': -122.08175490000001, u'mLatitude': 37.389681500000002, u'mTime': 1424283884.0})(8), prev_pt (AttrDict({'speed': 1967.4602106908915, u'mLongitude': -122.08172, u'mLatitude': 37.389809300000003, u'mTime': 1424283853.0})) speed = 469.076093973
DEBUG:root:currSpeed < 5067.56906422, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 1063.8553351523162, u'mLongitude': -122.0820346, u'mLatitude': 37.389813199999999, u'mTime': 1424283911.0})(9), prev_pt (AttrDict({'speed': 469.07609397285199, u'mLongitude': -122.08175490000001, u'mLatitude': 37.389681500000002, u'mTime': 1424283884.0})) speed = 1063.85533515
DEBUG:root:currSpeed < 5067.56906422, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 1171.9344153551756, u'mLongitude': -122.0820628, u'mLatitude': 37.389445000000002, u'mTime': 1424283946.0})(10), prev_pt (AttrDict({'speed': 1063.8553351523162, u'mLongitude': -122.0820346, u'mLatitude': 37.389813199999999, u'mTime': 1424283911.0})) speed = 1171.93441536
DEBUG:root:currSpeed < 5067.56906422, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 218.90137696380239, u'mLongitude': -122.0820902, u'mLatitude': 37.3893901, u'mTime': 1424283976.0})(11), prev_pt (AttrDict({'speed': 1171.9344153551756, u'mLongitude': -122.0820628, u'mLatitude': 37.389445000000002, u'mTime': 1424283946.0})) speed = 218.901376964
DEBUG:root:currSpeed < 5067.56906422, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 434.47480648049196, u'mLongitude': -122.0821617, u'mLatitude': 37.389296600000002, u'mTime': 1424284004.0})(12), prev_pt (AttrDict({'speed': 218.90137696380239, u'mLongitude': -122.0820902, u'mLatitude': 37.3893901, u'mTime': 1424283976.0})) speed = 434.47480648
DEBUG:root:currSpeed < 5067.56906422, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 259.50966804750732, u'mLongitude': -122.082187, u'mLatitude': 37.389227099999999, u'mTime': 1424284035.0})(13), prev_pt (AttrDict({'speed': 434.47480648049196, u'mLongitude': -122.0821617, u'mLatitude': 37.389296600000002, u'mTime': 1424284004.0})) speed = 259.509668048
DEBUG:root:currSpeed < 5067.56906422, retaining index 13
DEBUG:root:while considering point AttrDict({'speed': 521.91555431024358, u'mLongitude': -122.0820691, u'mLatitude': 37.389356300000003, u'mTime': 1424284069.0})(14), prev_pt (AttrDict({'speed': 259.50966804750732, u'mLongitude': -122.082187, u'mLatitude': 37.389227099999999, u'mTime': 1424284035.0})) speed = 521.91555431
DEBUG:root:currSpeed < 5067.56906422, retaining index 14
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14]
filtered list size went from (17, 8) to (15, 8)
filtering points Int64Index([0, 2], dtype='int64')
filtered list size went from (17, 8) to (15, 8)
DEBUG:root:quartile values are 0.25 443.125128
0.75 1599.236112
Name: speed, dtype: float64
DEBUG:root:iqr 1156.11098397
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14]
DEBUG:root:Found 1 potential outliers, list = [6]
DEBUG:root:Only one candidate, cluster centers are [array([6])]
DEBUG:root:Considering candidate cluster center [6]
DEBUG:root:lowRange = max(1, 0) = 1 and highRange = max(11, 15) = 11
DEBUG:root:Area size = 11, index = Int64Index([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], dtype='int64') with size 11
DEBUG:root:In area 1 - 11, deleted 4 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:with speed df shape is (15, 9), ransac_mask size = 15
DEBUG:root:filtering done, ransac deleted points = [0]
while considering point 1, speed = 1714.91114143
currSpeed < 5067, retaining index 1 in existing quality segment
while considering point 2, speed = 1158.23646534
currSpeed < 5067, retaining index 2 in existing quality segment
while considering point 3, speed = 353.662925261
currSpeed < 5067, retaining index 3 in existing quality segment
while considering point 4, speed = 1252.21102501
currSpeed < 5067, retaining index 4 in existing quality segment
while considering point 5, speed = 2137.83311644
currSpeed < 5067, retaining index 5 in existing quality segment
while considering point 6, speed = 3270.63064201
currSpeed < 5067, retaining index 6 in existing quality segment
while considering point 7, speed = 1967.46021069
currSpeed < 5067, retaining index 7 in existing quality segment
while considering point 8, speed = 469.076093973
currSpeed < 5067, retaining index 8 in existing quality segment
while considering point 9, speed = 1063.85533515
currSpeed < 5067, retaining index 9 in existing quality segment
while considering point 10, speed = 1171.93441536
currSpeed < 5067, retaining index 10 in existing quality segment
while considering point 11, speed = 218.901376964
currSpeed < 5067, retaining index 11 in existing quality segment
while considering point 12, speed = 434.47480648
currSpeed < 5067, retaining index 12 in existing quality segment
while considering point 13, speed = 259.509668048
currSpeed < 5067, retaining index 13 in existing quality segment
while considering point 14, speed = 521.91555431
currSpeed < 5067, retaining index 14 in existing quality segment
Number of quality segments is 1
filtering points Int64Index([0, 2], dtype='int64')
filtered list size went from (17, 8) to (15, 8)
filtering points Int64Index([0, 2], dtype='int64')
DEBUG:root:while considering point AttrDict({'speed': 1714.9111414262063, u'mLongitude': -122.0844764, u'mLatitude': 37.389205199999999, u'mTime': 1424283663.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -122.08479629999999, u'mLatitude': 37.390127, u'mTime': 1424283601.0})) speed = 1714.91114143
DEBUG:root:currSpeed < 3123.36696369, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 1158.2364653367522, u'mLongitude': -122.0840846, u'mLatitude': 37.389119399999998, u'mTime': 1424283694.0})(2), prev_pt (AttrDict({'speed': 1714.9111414262063, u'mLongitude': -122.0844764, u'mLatitude': 37.389205199999999, u'mTime': 1424283663.0})) speed = 1158.23646534
DEBUG:root:currSpeed < 3123.36696369, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 353.66292526104058, u'mLongitude': -122.0839608, u'mLatitude': 37.389112599999997, u'mTime': 1424283725.0})(3), prev_pt (AttrDict({'speed': 1158.2364653367522, u'mLongitude': -122.0840846, u'mLatitude': 37.389119399999998, u'mTime': 1424283694.0})) speed = 353.662925261
DEBUG:root:currSpeed < 3123.36696369, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 1252.2110250065632, u'mLongitude': -122.0835682, u'mLatitude': 37.388910600000003, u'mTime': 1424283758.0})(4), prev_pt (AttrDict({'speed': 353.66292526104058, u'mLongitude': -122.0839608, u'mLatitude': 37.389112599999997, u'mTime': 1424283725.0})) speed = 1252.21102501
DEBUG:root:currSpeed < 3123.36696369, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 2137.8331164399965, u'mLongitude': -122.0828456, u'mLatitude': 37.388689499999998, u'mTime': 1424283790.0})(5), prev_pt (AttrDict({'speed': 1252.2110250065632, u'mLongitude': -122.0835682, u'mLatitude': 37.388910600000003, u'mTime': 1424283758.0})) speed = 2137.83311644
DEBUG:root:currSpeed < 3123.36696369, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 3270.6306420100191, u'mLongitude': -122.0823149, u'mLatitude': 37.389530999999998, u'mTime': 1424283822.0})(6), prev_pt (AttrDict({'speed': 2137.8331164399965, u'mLongitude': -122.0828456, u'mLatitude': 37.388689499999998, u'mTime': 1424283790.0})) speed = 3270.63064201
DEBUG:root:currSpeed > 3123.36696369, removing index 6
DEBUG:root:while considering point AttrDict({'speed': 1967.4602106908915, u'mLongitude': -122.08172, u'mLatitude': 37.389809300000003, u'mTime': 1424283853.0})(7), prev_pt (AttrDict({'speed': 2137.8331164399965, u'mLongitude': -122.0828456, u'mLatitude': 37.388689499999998, u'mTime': 1424283790.0})) speed = 2529.41190174
DEBUG:root:currSpeed < 3123.36696369, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 469.07609397285199, u'mLongitude': -122.08175490000001, u'mLatitude': 37.389681500000002, u'mTime': 1424283884.0})(8), prev_pt (AttrDict({'speed': 1967.4602106908915, u'mLongitude': -122.08172, u'mLatitude': 37.389809300000003, u'mTime': 1424283853.0})) speed = 469.076093973
DEBUG:root:currSpeed < 3123.36696369, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 1063.8553351523162, u'mLongitude': -122.0820346, u'mLatitude': 37.389813199999999, u'mTime': 1424283911.0})(9), prev_pt (AttrDict({'speed': 469.07609397285199, u'mLongitude': -122.08175490000001, u'mLatitude': 37.389681500000002, u'mTime': 1424283884.0})) speed = 1063.85533515
DEBUG:root:currSpeed < 3123.36696369, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 1171.9344153551756, u'mLongitude': -122.0820628, u'mLatitude': 37.389445000000002, u'mTime': 1424283946.0})(10), prev_pt (AttrDict({'speed': 1063.8553351523162, u'mLongitude': -122.0820346, u'mLatitude': 37.389813199999999, u'mTime': 1424283911.0})) speed = 1171.93441536
DEBUG:root:currSpeed < 3123.36696369, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 218.90137696380239, u'mLongitude': -122.0820902, u'mLatitude': 37.3893901, u'mTime': 1424283976.0})(11), prev_pt (AttrDict({'speed': 1171.9344153551756, u'mLongitude': -122.0820628, u'mLatitude': 37.389445000000002, u'mTime': 1424283946.0})) speed = 218.901376964
DEBUG:root:currSpeed < 3123.36696369, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 434.47480648049196, u'mLongitude': -122.0821617, u'mLatitude': 37.389296600000002, u'mTime': 1424284004.0})(12), prev_pt (AttrDict({'speed': 218.90137696380239, u'mLongitude': -122.0820902, u'mLatitude': 37.3893901, u'mTime': 1424283976.0})) speed = 434.47480648
DEBUG:root:currSpeed < 3123.36696369, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 259.50966804750732, u'mLongitude': -122.082187, u'mLatitude': 37.389227099999999, u'mTime': 1424284035.0})(13), prev_pt (AttrDict({'speed': 434.47480648049196, u'mLongitude': -122.0821617, u'mLatitude': 37.389296600000002, u'mTime': 1424284004.0})) speed = 259.509668048
DEBUG:root:currSpeed < 3123.36696369, retaining index 13
DEBUG:root:while considering point AttrDict({'speed': 521.91555431024358, u'mLongitude': -122.0820691, u'mLatitude': 37.389356300000003, u'mTime': 1424284069.0})(14), prev_pt (AttrDict({'speed': 259.50966804750732, u'mLongitude': -122.082187, u'mLatitude': 37.389227099999999, u'mTime': 1424284035.0})) speed = 521.91555431
DEBUG:root:currSpeed < 3123.36696369, retaining index 14
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 7 8 9 10 11 12 13 14]
filtered list size went from (17, 8) to (15, 8)
filtering points Int64Index([0, 2], dtype='int64')
filtered list size went from (17, 8) to (15, 8)
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14]
while considering point 1, speed = 1714.91114143
currSpeed < 3123, retaining index 1 in existing quality segment
while considering point 2, speed = 1158.23646534
currSpeed < 3123, retaining index 2 in existing quality segment
while considering point 3, speed = 353.662925261
currSpeed < 3123, retaining index 3 in existing quality segment
while considering point 4, speed = 1252.21102501
currSpeed < 3123, retaining index 4 in existing quality segment
while considering point 5, speed = 2137.83311644
currSpeed < 3123, retaining index 5 in existing quality segment
while considering point 6, speed = 3270.63064201
currSpeed > 3123, starting new quality segment at index 6
while considering point 7, speed = 1967.46021069
currSpeed < 3123, retaining index 7 in existing quality segment
while considering point 8, speed = 469.076093973
currSpeed < 3123, retaining index 8 in existing quality segment
while considering point 9, speed = 1063.85533515
currSpeed < 3123, retaining index 9 in existing quality segment
while considering point 10, speed = 1171.93441536
currSpeed < 3123, retaining index 10 in existing quality segment
while considering point 11, speed = 218.901376964
currSpeed < 3123, retaining index 11 in existing quality segment
while considering point 12, speed = 434.47480648
currSpeed < 3123, retaining index 12 in existing quality segment
while considering point 13, speed = 259.509668048
currSpeed < 3123, retaining index 13 in existing quality segment
while considering point 14, speed = 521.91555431
currSpeed < 3123, retaining index 14 in existing quality segment
Number of quality segments is 2
Considering segments [1, 2, 3, 4, 5] and [6, 7, 8, 9, 10, 11, 12, 13, 14]
About to compare curr_segment duration 247.0 with last segment duration 127.0
prev segment [1, 2, 3, 4, 5] is shorter, cut it
Comparing distance 101.013330375 with speed 3123.36696369 * time 279.0 = 871419.382868
Comparing distance 141.410884261 with speed 3123.36696369 * time 311.0 = 971367.125706
Comparing distance 169.309703264 with speed 3123.36696369 * time 344.0 = 1074438.23551
Comparing distance 180.002426651 with speed 3123.36696369 * time 375.0 = 1171262.61138
Comparing distance 213.341584609 with speed 3123.36696369 * time 406.0 = 1268086.98726
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1423621988.0}}, {'data.mTime': {'$lt': 1423622416.0}}], 'user_id': u'20150210T183308-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([], dtype='int64')
DEBUG:root:quartile values are 0.25 280.68905
0.75 1065.05889
Name: speed, dtype: float64
DEBUG:root:iqr 784.369839955
DEBUG:root:Found 1 potential outliers, list = [5]
DEBUG:root:Only one candidate, cluster centers are [array([5])]
DEBUG:root:Considering candidate cluster center [5]
DEBUG:root:lowRange = max(0, 0) = 0 and highRange = max(10, 14) = 10
DEBUG:root:Area size = 11, index = Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], dtype='int64') with size 11
DEBUG:root:In area 0 - 10, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:with speed df shape is (14, 9), ransac_mask size = 14
DEBUG:root:filtering done, ransac deleted points = [0]
filtered list size went from (14, 8) to (14, 8)
filtering points Int64Index([], dtype='int64')
filtered list size went from (14, 8) to (14, 8)
filtering points Int64Index([], dtype='int64')
DEBUG:root:quartile values are 0.25 280.68905
0.75 1065.05889
Name: speed, dtype: float64
DEBUG:root:iqr 784.369839955
DEBUG:root:while considering point AttrDict({'speed': 1368.205909175063, u'mLongitude': -122.0841873, u'mLatitude': 37.3892782, u'mTime': 1423622023.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -122.0845948, u'mLatitude': 37.389455499999997, u'mTime': 1423621993.0})) speed = 1368.20590918
DEBUG:root:currSpeed < 3418.16840985, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 617.55099371586164, u'mLongitude': -122.0840984, u'mLatitude': 37.389127299999998, u'mTime': 1423622053.0})(2), prev_pt (AttrDict({'speed': 1368.205909175063, u'mLongitude': -122.0841873, u'mLatitude': 37.3892782, u'mTime': 1423622023.0})) speed = 617.550993716
DEBUG:root:currSpeed < 3418.16840985, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 446.28585205291455, u'mLongitude': -122.08402769999999, u'mLatitude': 37.389020799999997, u'mTime': 1423622083.0})(3), prev_pt (AttrDict({'speed': 617.55099371586164, u'mLongitude': -122.0840984, u'mLatitude': 37.389127299999998, u'mTime': 1423622053.0})) speed = 446.285852053
DEBUG:root:currSpeed < 3418.16840985, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 391.3272689772711, u'mLongitude': -122.08393169999999, u'mLatitude': 37.389093799999998, u'mTime': 1423622113.0})(4), prev_pt (AttrDict({'speed': 446.28585205291455, u'mLongitude': -122.08402769999999, u'mLatitude': 37.389020799999997, u'mTime': 1423622083.0})) speed = 391.327268977
DEBUG:root:currSpeed < 3418.16840985, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 4714.4571027870425, u'mLongitude': -122.08224269999999, u'mLatitude': 37.389489699999999, u'mTime': 1423622146.0})(5), prev_pt (AttrDict({'speed': 391.3272689772711, u'mLongitude': -122.08393169999999, u'mLatitude': 37.389093799999998, u'mTime': 1423622113.0})) speed = 4714.45710279
DEBUG:root:currSpeed > 3418.16840985, removing index 5
DEBUG:root:while considering point AttrDict({'speed': 2307.024067069578, u'mLongitude': -122.0815518, u'mLatitude': 37.389783100000002, u'mTime': 1423622176.0})(6), prev_pt (AttrDict({'speed': 391.3272689772711, u'mLongitude': -122.08393169999999, u'mLatitude': 37.389093799999998, u'mTime': 1423622113.0})) speed = 3552.26077521
DEBUG:root:currSpeed > 3418.16840985, removing index 6
DEBUG:root:while considering point AttrDict({'speed': 129.175060870187, u'mLongitude': -122.08158589999999, u'mLatitude': 37.389765099999998, u'mTime': 1423622204.0})(7), prev_pt (AttrDict({'speed': 391.3272689772711, u'mLongitude': -122.08393169999999, u'mLatitude': 37.389093799999998, u'mTime': 1423622113.0})) speed = 2420.63897695
DEBUG:root:currSpeed < 3418.16840985, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 1065.0588899866, u'mLongitude': -122.08199329999999, u'mLatitude': 37.389800899999997, u'mTime': 1423622238.0})(8), prev_pt (AttrDict({'speed': 129.175060870187, u'mLongitude': -122.08158589999999, u'mLatitude': 37.389765099999998, u'mTime': 1423622204.0})) speed = 1065.05888999
DEBUG:root:currSpeed < 3418.16840985, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 469.43748807779667, u'mLongitude': -122.0818565, u'mLatitude': 37.389727999999998, u'mTime': 1423622269.0})(9), prev_pt (AttrDict({'speed': 1065.0588899866, u'mLongitude': -122.08199329999999, u'mLatitude': 37.389800899999997, u'mTime': 1423622238.0})) speed = 469.437488078
DEBUG:root:currSpeed < 3418.16840985, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 204.01120172193245, u'mLongitude': -122.0819214, u'mLatitude': 37.389752000000001, u'mTime': 1423622300.0})(10), prev_pt (AttrDict({'speed': 469.43748807779667, u'mLongitude': -122.0818565, u'mLatitude': 37.389727999999998, u'mTime': 1423622269.0})) speed = 204.011201722
DEBUG:root:currSpeed < 3418.16840985, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 280.68905003182931, u'mLongitude': -122.08200290000001, u'mLatitude': 37.389762699999999, u'mTime': 1423622326.0})(11), prev_pt (AttrDict({'speed': 204.01120172193245, u'mLongitude': -122.0819214, u'mLatitude': 37.389752000000001, u'mTime': 1423622300.0})) speed = 280.689050032
DEBUG:root:currSpeed < 3418.16840985, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 234.28084588134055, u'mLongitude': -122.08185880000001, u'mLatitude': 37.389780600000002, u'mTime': 1423622381.0})(12), prev_pt (AttrDict({'speed': 280.68905003182931, u'mLongitude': -122.08200290000001, u'mLatitude': 37.389762699999999, u'mTime': 1423622326.0})) speed = 234.280845881
DEBUG:root:currSpeed < 3418.16840985, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 647.19035840865513, u'mLongitude': -122.0818235, u'mLatitude': 37.389729600000003, u'mTime': 1423622391.0})(13), prev_pt (AttrDict({'speed': 234.28084588134055, u'mLongitude': -122.08185880000001, u'mLatitude': 37.389780600000002, u'mTime': 1423622381.0})) speed = 647.190358409
DEBUG:root:currSpeed < 3418.16840985, retaining index 13
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 7 8 9 10 11 12 13]
filtered list size went from (14, 8) to (14, 8)
filtering points Int64Index([], dtype='int64')
DEBUG:root:quartile values are 0.25 280.68905
0.75 1065.05889
Name: speed, dtype: float64
DEBUG:root:iqr 784.369839955
filtered list size went from (14, 8) to (14, 8)
while considering point 1, speed = 1368.20590918
currSpeed < 3418, retaining index 1 in existing quality segment
while considering point 2, speed = 617.550993716
currSpeed < 3418, retaining index 2 in existing quality segment
while considering point 3, speed = 446.285852053
currSpeed < 3418, retaining index 3 in existing quality segment
while considering point 4, speed = 391.327268977
currSpeed < 3418, retaining index 4 in existing quality segment
while considering point 5, speed = 4714.45710279
currSpeed > 3418, starting new quality segment at index 5
while considering point 6, speed = 2307.02406707
currSpeed < 3418, retaining index 6 in existing quality segment
while considering point 7, speed = 129.17506087
currSpeed < 3418, retaining index 7 in existing quality segment
while considering point 8, speed = 1065.05888999
currSpeed < 3418, retaining index 8 in existing quality segment
while considering point 9, speed = 469.437488078
currSpeed < 3418, retaining index 9 in existing quality segment
while considering point 10, speed = 204.011201722
currSpeed < 3418, retaining index 10 in existing quality segment
while considering point 11, speed = 280.689050032
currSpeed < 3418, retaining index 11 in existing quality segment
while considering point 12, speed = 234.280845881
currSpeed < 3418, retaining index 12 in existing quality segment
while considering point 13, speed = 647.190358409
currSpeed < 3418, retaining index 13 in existing quality segment
Number of quality segments is 2
Considering segments [1, 2, 3, 4] and [5, 6, 7, 8, 9, 10, 11, 12, 13]
About to compare curr_segment duration 245.0 with last segment duration 90.0
prev segment [1, 2, 3, 4] is shorter, cut it
Comparing distance 199.220185938 with speed 3418.16840985 * time 278.0 = 950250.817939
Comparing distance 210.080101397 with speed 3418.16840985 * time 308.0 = 1052795.87023
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13]
DEBUG:root:Found 1 potential outliers, list = [5]
DEBUG:root:Only one candidate, cluster centers are [array([5])]
DEBUG:root:Considering candidate cluster center [5]
DEBUG:root:lowRange = max(0, 0) = 0 and highRange = max(10, 14) = 10
DEBUG:root:Area size = 11, index = Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], dtype='int64') with size 11
DEBUG:root:In area 0 - 10, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:with speed df shape is (14, 9), ransac_mask size = 14
DEBUG:root:filtering done, ransac deleted points = [0]
DEBUG:root:while considering point AttrDict({'speed': 1368.205909175063, u'mLongitude': -122.0841873, u'mLatitude': 37.3892782, u'mTime': 1423622023.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -122.0845948, u'mLatitude': 37.389455499999997, u'mTime': 1423621993.0})) speed = 1368.20590918
DEBUG:root:currSpeed < 4425.5651385, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 617.55099371586164, u'mLongitude': -122.0840984, u'mLatitude': 37.389127299999998, u'mTime': 1423622053.0})(2), prev_pt (AttrDict({'speed': 1368.205909175063, u'mLongitude': -122.0841873, u'mLatitude': 37.3892782, u'mTime': 1423622023.0})) speed = 617.550993716
DEBUG:root:currSpeed < 4425.5651385, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 446.28585205291455, u'mLongitude': -122.08402769999999, u'mLatitude': 37.389020799999997, u'mTime': 1423622083.0})(3), prev_pt (AttrDict({'speed': 617.55099371586164, u'mLongitude': -122.0840984, u'mLatitude': 37.389127299999998, u'mTime': 1423622053.0})) speed = 446.285852053
DEBUG:root:currSpeed < 4425.5651385, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 391.3272689772711, u'mLongitude': -122.08393169999999, u'mLatitude': 37.389093799999998, u'mTime': 1423622113.0})(4), prev_pt (AttrDict({'speed': 446.28585205291455, u'mLongitude': -122.08402769999999, u'mLatitude': 37.389020799999997, u'mTime': 1423622083.0})) speed = 391.327268977
DEBUG:root:currSpeed < 4425.5651385, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 4714.4571027870425, u'mLongitude': -122.08224269999999, u'mLatitude': 37.389489699999999, u'mTime': 1423622146.0})(5), prev_pt (AttrDict({'speed': 391.3272689772711, u'mLongitude': -122.08393169999999, u'mLatitude': 37.389093799999998, u'mTime': 1423622113.0})) speed = 4714.45710279
DEBUG:root:currSpeed > 4425.5651385, removing index 5
DEBUG:root:while considering point AttrDict({'speed': 2307.024067069578, u'mLongitude': -122.0815518, u'mLatitude': 37.389783100000002, u'mTime': 1423622176.0})(6), prev_pt (AttrDict({'speed': 391.3272689772711, u'mLongitude': -122.08393169999999, u'mLatitude': 37.389093799999998, u'mTime': 1423622113.0})) speed = 3552.26077521
DEBUG:root:currSpeed < 4425.5651385, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 129.175060870187, u'mLongitude': -122.08158589999999, u'mLatitude': 37.389765099999998, u'mTime': 1423622204.0})(7), prev_pt (AttrDict({'speed': 2307.024067069578, u'mLongitude': -122.0815518, u'mLatitude': 37.389783100000002, u'mTime': 1423622176.0})) speed = 129.17506087
DEBUG:root:currSpeed < 4425.5651385, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 1065.0588899866, u'mLongitude': -122.08199329999999, u'mLatitude': 37.389800899999997, u'mTime': 1423622238.0})(8), prev_pt (AttrDict({'speed': 129.175060870187, u'mLongitude': -122.08158589999999, u'mLatitude': 37.389765099999998, u'mTime': 1423622204.0})) speed = 1065.05888999
DEBUG:root:currSpeed < 4425.5651385, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 469.43748807779667, u'mLongitude': -122.0818565, u'mLatitude': 37.389727999999998, u'mTime': 1423622269.0})(9), prev_pt (AttrDict({'speed': 1065.0588899866, u'mLongitude': -122.08199329999999, u'mLatitude': 37.389800899999997, u'mTime': 1423622238.0})) speed = 469.437488078
DEBUG:root:currSpeed < 4425.5651385, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 204.01120172193245, u'mLongitude': -122.0819214, u'mLatitude': 37.389752000000001, u'mTime': 1423622300.0})(10), prev_pt (AttrDict({'speed': 469.43748807779667, u'mLongitude': -122.0818565, u'mLatitude': 37.389727999999998, u'mTime': 1423622269.0})) speed = 204.011201722
DEBUG:root:currSpeed < 4425.5651385, retaining index 10
DEBUG:root:while considering point AttrDict({'speed': 280.68905003182931, u'mLongitude': -122.08200290000001, u'mLatitude': 37.389762699999999, u'mTime': 1423622326.0})(11), prev_pt (AttrDict({'speed': 204.01120172193245, u'mLongitude': -122.0819214, u'mLatitude': 37.389752000000001, u'mTime': 1423622300.0})) speed = 280.689050032
DEBUG:root:currSpeed < 4425.5651385, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 234.28084588134055, u'mLongitude': -122.08185880000001, u'mLatitude': 37.389780600000002, u'mTime': 1423622381.0})(12), prev_pt (AttrDict({'speed': 280.68905003182931, u'mLongitude': -122.08200290000001, u'mLatitude': 37.389762699999999, u'mTime': 1423622326.0})) speed = 234.280845881
DEBUG:root:currSpeed < 4425.5651385, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 647.19035840865513, u'mLongitude': -122.0818235, u'mLatitude': 37.389729600000003, u'mTime': 1423622391.0})(13), prev_pt (AttrDict({'speed': 234.28084588134055, u'mLongitude': -122.08185880000001, u'mLatitude': 37.389780600000002, u'mTime': 1423622381.0})) speed = 647.190358409
DEBUG:root:currSpeed < 4425.5651385, retaining index 13
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 6 7 8 9 10 11 12 13]
Comparing distance 211.846282086 with speed 3418.16840985 * time 338.0 = 1155340.92253
Comparing distance 214.782507979 with speed 3418.16840985 * time 368.0 = 1257885.97483
filtering points Int64Index([], dtype='int64')
filtered list size went from (14, 8) to (14, 8)
filtering points Int64Index([], dtype='int64')
filtered list size went from (14, 8) to (14, 8)
filtering points Int64Index([], dtype='int64')
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13]
filtered list size went from (14, 8) to (14, 8)
while considering point 1, speed = 1368.20590918
currSpeed < 4425, retaining index 1 in existing quality segment
while considering point 2, speed = 617.550993716
currSpeed < 4425, retaining index 2 in existing quality segment
while considering point 3, speed = 446.285852053
currSpeed < 4425, retaining index 3 in existing quality segment
while considering point 4, speed = 391.327268977
currSpeed < 4425, retaining index 4 in existing quality segment
while considering point 5, speed = 4714.45710279
currSpeed > 4425, starting new quality segment at index 5
while considering point 6, speed = 2307.02406707
currSpeed < 4425, retaining index 6 in existing quality segment
while considering point 7, speed = 129.17506087
currSpeed < 4425, retaining index 7 in existing quality segment
while considering point 8, speed = 1065.05888999
currSpeed < 4425, retaining index 8 in existing quality segment
while considering point 9, speed = 469.437488078
currSpeed < 4425, retaining index 9 in existing quality segment
while considering point 10, speed = 204.011201722
currSpeed < 4425, retaining index 10 in existing quality segment
while considering point 11, speed = 280.689050032
currSpeed < 4425, retaining index 11 in existing quality segment
while considering point 12, speed = 234.280845881
currSpeed < 4425, retaining index 12 in existing quality segment
while considering point 13, speed = 647.190358409
currSpeed < 4425, retaining index 13 in existing quality segment
Number of quality segments is 2
Considering segments [1, 2, 3, 4] and [5, 6, 7, 8, 9, 10, 11, 12, 13]
About to compare curr_segment duration 245.0 with last segment duration 90.0
prev segment [1, 2, 3, 4] is shorter, cut it
Comparing distance 199.220185938 with speed 4425.5651385 * time 278.0 = 1230307.1085
Comparing distance 210.080101397 with speed 4425.5651385 * time 308.0 = 1363074.06266
Comparing distance 211.846282086 with speed 4425.5651385 * time 338.0 = 1495841.01681
Comparing distance 214.782507979 with speed 4425.5651385 * time 368.0 = 1628607.97097
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1422492665.0}}, {'data.mTime': {'$lt': 1422493114.0}}], 'user_id': u'20150128T165105-0800_0', 'metadata.filter': u'time'}
filtering points Int64Index([11, 12], dtype='int64')
DEBUG:root:quartile values are 0.25 880.814394
0.75 1606.475399
Name: speed, dtype: float64
DEBUG:root:iqr 725.661004609
DEBUG:root:Found 1 potential outliers, list = [10]
DEBUG:root:Only one candidate, cluster centers are [array([10])]
DEBUG:root:Considering candidate cluster center [10]
DEBUG:root:lowRange = max(5, 0) = 5 and highRange = max(15, 20) = 15
DEBUG:root:Area size = 11, index = Int64Index([5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], dtype='int64') with size 11
DEBUG:root:In area 5 - 15, deleted 2 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:with speed df shape is (20, 9), ransac_mask size = 20
DEBUG:root:filtering done, ransac deleted points = [0]
filtered list size went from (22, 8) to (20, 8)
filtering points Int64Index([11, 12], dtype='int64')
filtered list size went from (22, 8) to (20, 8)
filtering points Int64Index([11, 12], dtype='int64')
DEBUG:root:quartile values are 0.25 880.814394
0.75 1606.475399
Name: speed, dtype: float64
DEBUG:root:iqr 725.661004609
DEBUG:root:while considering point AttrDict({'speed': 557.30244938977273, u'mLongitude': -122.0830583, u'mLatitude': 37.390888099999998, u'mTime': 1422492696.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -122.08306140000001, u'mLatitude': 37.390752800000001, u'mTime': 1422492669.0})) speed = 557.30244939
DEBUG:root:currSpeed < 3783.45841289, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 1726.7809691505277, u'mLongitude': -122.0827467, u'mLatitude': 37.390439399999998, u'mTime': 1422492729.0})(2), prev_pt (AttrDict({'speed': 557.30244938977273, u'mLongitude': -122.0830583, u'mLatitude': 37.390888099999998, u'mTime': 1422492696.0})) speed = 1726.78096915
DEBUG:root:currSpeed < 3783.45841289, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 1552.9437219536323, u'mLongitude': -122.0830246, u'mLatitude': 37.3908755, u'mTime': 1422492764.0})(3), prev_pt (AttrDict({'speed': 1726.7809691505277, u'mLongitude': -122.0827467, u'mLatitude': 37.390439399999998, u'mTime': 1422492729.0})) speed = 1552.94372195
DEBUG:root:currSpeed < 3783.45841289, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 1143.692039630497, u'mLongitude': -122.0834236, u'mLatitude': 37.390841299999998, u'mTime': 1422492795.0})(4), prev_pt (AttrDict({'speed': 1552.9437219536323, u'mLongitude': -122.0830246, u'mLatitude': 37.3908755, u'mTime': 1422492764.0})) speed = 1143.69203963
DEBUG:root:currSpeed < 3783.45841289, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 805.44557234994636, u'mLongitude': -122.0833117, u'mLatitude': 37.391047499999999, u'mTime': 1422492826.0})(5), prev_pt (AttrDict({'speed': 1143.692039630497, u'mLongitude': -122.0834236, u'mLatitude': 37.390841299999998, u'mTime': 1422492795.0})) speed = 805.44557235
DEBUG:root:currSpeed < 3783.45841289, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 164.66399228442248, u'mLongitude': -122.0833416, u'mLatitude': 37.391077799999998, u'mTime': 1422492852.0})(6), prev_pt (AttrDict({'speed': 805.44557234994636, u'mLongitude': -122.0833117, u'mLatitude': 37.391047499999999, u'mTime': 1422492826.0})) speed = 164.663992284
DEBUG:root:currSpeed < 3783.45841289, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 3020.7906226048144, u'mLongitude': -122.0842311, u'mLatitude': 37.390325300000001, u'mTime': 1422492890.0})(7), prev_pt (AttrDict({'speed': 164.66399228442248, u'mLongitude': -122.0833416, u'mLatitude': 37.391077799999998, u'mTime': 1422492852.0})) speed = 3020.7906226
DEBUG:root:currSpeed < 3783.45841289, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 381.06973324648328, u'mLongitude': -122.0841322, u'mLatitude': 37.390259, u'mTime': 1422492920.0})(8), prev_pt (AttrDict({'speed': 3020.7906226048144, u'mLongitude': -122.0842311, u'mLatitude': 37.390325300000001, u'mTime': 1422492890.0})) speed = 381.069733246
DEBUG:root:currSpeed < 3783.45841289, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 543.7735388058569, u'mLongitude': -122.0843143, u'mLatitude': 37.390234700000001, u'mTime': 1422492950.0})(9), prev_pt (AttrDict({'speed': 381.06973324648328, u'mLongitude': -122.0841322, u'mLatitude': 37.390259, u'mTime': 1422492920.0})) speed = 543.773538806
DEBUG:root:currSpeed < 3783.45841289, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 3813.2908661259862, u'mLongitude': -122.08436639999999, u'mLatitude': 37.3891724, u'mTime': 1422492981.0})(10), prev_pt (AttrDict({'speed': 543.7735388058569, u'mLongitude': -122.0843143, u'mLatitude': 37.390234700000001, u'mTime': 1422492950.0})) speed = 3813.29086613
DEBUG:root:currSpeed > 3783.45841289, removing index 10
DEBUG:root:while considering point AttrDict({'speed': 1697.7058794248455, u'mLongitude': -122.085705, u'mLatitude': 37.389889099999998, u'mTime': 1422493065.0})(11), prev_pt (AttrDict({'speed': 543.7735388058569, u'mLongitude': -122.0843143, u'mLatitude': 37.390234700000001, u'mTime': 1422492950.0})) speed = 1119.41957262
DEBUG:root:currSpeed < 3783.45841289, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 993.31294655875513, u'mLongitude': -122.0857108, u'mLatitude': 37.389942499999997, u'mTime': 1422493071.0})(12), prev_pt (AttrDict({'speed': 1697.7058794248455, u'mLongitude': -122.085705, u'mLatitude': 37.389889099999998, u'mTime': 1422493065.0})) speed = 993.312946559
DEBUG:root:currSpeed < 3783.45841289, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 1111.0169011073219, u'mLongitude': -122.0857606, u'mLatitude': 37.389972999999998, u'mTime': 1422493076.0})(13), prev_pt (AttrDict({'speed': 993.31294655875513, u'mLongitude': -122.0857108, u'mLatitude': 37.389942499999997, u'mTime': 1422493071.0})) speed = 1111.01690111
DEBUG:root:currSpeed < 3783.45841289, retaining index 13
DEBUG:root:while considering point AttrDict({'speed': 1660.0070761786099, u'mLongitude': -122.0858429, u'mLatitude': 37.390008999999999, u'mTime': 1422493081.0})(14), prev_pt (AttrDict({'speed': 1111.0169011073219, u'mLongitude': -122.0857606, u'mLatitude': 37.389972999999998, u'mTime': 1422493076.0})) speed = 1660.00707618
DEBUG:root:currSpeed < 3783.45841289, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 956.18321656448688, u'mLongitude': -122.085886, u'mLatitude': 37.390034999999997, u'mTime': 1422493086.0})(15), prev_pt (AttrDict({'speed': 1660.0070761786099, u'mLongitude': -122.0858429, u'mLatitude': 37.390008999999999, u'mTime': 1422493081.0})) speed = 956.183216564
DEBUG:root:currSpeed < 3783.45841289, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 1005.8208845597222, u'mLongitude': -122.0859435, u'mLatitude': 37.390064299999999, u'mTime': 1422493092.0})(16), prev_pt (AttrDict({'speed': 956.18321656448688, u'mLongitude': -122.085886, u'mLatitude': 37.390034999999997, u'mTime': 1422493086.0})) speed = 1005.82088456
DEBUG:root:currSpeed < 3783.45841289, retaining index 16
DEBUG:root:while considering point AttrDict({'speed': 956.67390650143193, u'mLongitude': -122.0859911, u'mLatitude': 37.390084799999997, u'mTime': 1422493097.0})(17), prev_pt (AttrDict({'speed': 1005.8208845597222, u'mLongitude': -122.0859435, u'mLatitude': 37.390064299999999, u'mTime': 1422493092.0})) speed = 956.673906501
DEBUG:root:currSpeed < 3783.45841289, retaining index 17
DEBUG:root:while considering point AttrDict({'speed': 1227.9980243251143, u'mLongitude': -122.0860522, u'mLatitude': 37.390129899999998, u'mTime': 1422493103.0})(18), prev_pt (AttrDict({'speed': 956.67390650143193, u'mLongitude': -122.0859911, u'mLatitude': 37.390084799999997, u'mTime': 1422493097.0})) speed = 1227.99802433
DEBUG:root:currSpeed < 3783.45841289, retaining index 18
DEBUG:root:while considering point AttrDict({'speed': 1541.1402452154725, u'mLongitude': -122.0861232, u'mLatitude': 37.390191000000002, u'mTime': 1422493109.0})(19), prev_pt (AttrDict({'speed': 1227.9980243251143, u'mLongitude': -122.0860522, u'mLatitude': 37.390129899999998, u'mTime': 1422493103.0})) speed = 1541.14024522
DEBUG:root:currSpeed < 3783.45841289, retaining index 19
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 11 12 13 14 15 16 17 18 19]
filtered list size went from (22, 8) to (20, 8)
filtering points Int64Index([11, 12], dtype='int64')
DEBUG:root:quartile values are 0.25 880.814394
0.75 1606.475399
Name: speed, dtype: float64
DEBUG:root:iqr 725.661004609
filtered list size went from (22, 8) to (20, 8)
while considering point 1, speed = 557.30244939
currSpeed < 3783, retaining index 1 in existing quality segment
while considering point 2, speed = 1726.78096915
currSpeed < 3783, retaining index 2 in existing quality segment
while considering point 3, speed = 1552.94372195
currSpeed < 3783, retaining index 3 in existing quality segment
while considering point 4, speed = 1143.69203963
currSpeed < 3783, retaining index 4 in existing quality segment
while considering point 5, speed = 805.44557235
currSpeed < 3783, retaining index 5 in existing quality segment
while considering point 6, speed = 164.663992284
currSpeed < 3783, retaining index 6 in existing quality segment
while considering point 7, speed = 3020.7906226
currSpeed < 3783, retaining index 7 in existing quality segment
while considering point 8, speed = 381.069733246
currSpeed < 3783, retaining index 8 in existing quality segment
while considering point 9, speed = 543.773538806
currSpeed < 3783, retaining index 9 in existing quality segment
while considering point 10, speed = 3813.29086613
currSpeed > 3783, starting new quality segment at index 10
while considering point 11, speed = 1697.70587942
currSpeed < 3783, retaining index 11 in existing quality segment
while considering point 12, speed = 993.312946559
currSpeed < 3783, retaining index 12 in existing quality segment
while considering point 13, speed = 1111.01690111
currSpeed < 3783, retaining index 13 in existing quality segment
while considering point 14, speed = 1660.00707618
currSpeed < 3783, retaining index 14 in existing quality segment
while considering point 15, speed = 956.183216564
currSpeed < 3783, retaining index 15 in existing quality segment
while considering point 16, speed = 1005.82088456
currSpeed < 3783, retaining index 16 in existing quality segment
while considering point 17, speed = 956.673906501
currSpeed < 3783, retaining index 17 in existing quality segment
while considering point 18, speed = 1227.99802433
currSpeed < 3783, retaining index 18 in existing quality segment
while considering point 19, speed = 1541.14024522
currSpeed < 3783, retaining index 19 in existing quality segment
Number of quality segments is 2
Considering segments [1, 2, 3, 4, 5, 6, 7, 8, 9] and [10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
About to compare curr_segment duration 128.0 with last segment duration 254.0
curr segment [10, 11, 12, 13, 14, 15, 16, 17, 18, 19] is shorter, cut it
Comparing distance 118.21201685 with speed 3783.45841289 * time 31.0 = 117287.2108
Comparing distance 128.733250851 with speed 3783.45841289 * time 115.0 = 435097.717483
Comparing distance 127.58254021 with speed 3783.45841289 * time 121.0 = 457798.46796
Comparing distance 131.047308676 with speed 3783.45841289 * time 126.0 = 476715.760024
Comparing distance 137.358646776 with speed 3783.45841289 * time 131.0 = 495633.052089
Comparing distance 140.618555753 with speed 3783.45841289 * time 136.0 = 514550.344153
Comparing distance 145.17587796 with speed 3783.45841289 * time 142.0 = 537251.094631
Comparing distance 149.074136229 with speed 3783.45841289 * time 147.0 = 556168.386695
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19]
DEBUG:root:Found 1 potential outliers, list = [10]
DEBUG:root:Only one candidate, cluster centers are [array([10])]
DEBUG:root:Considering candidate cluster center [10]
DEBUG:root:lowRange = max(5, 0) = 5 and highRange = max(15, 20) = 15
DEBUG:root:Area size = 11, index = Int64Index([5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], dtype='int64') with size 11
DEBUG:root:In area 5 - 15, deleted 1 points through ransac filtering
DEBUG:root:Retain mask is of size 11
DEBUG:root:with speed df shape is (20, 9), ransac_mask size = 20
DEBUG:root:filtering done, ransac deleted points = [0]
DEBUG:root:while considering point AttrDict({'speed': 557.30244938977273, u'mLongitude': -122.0830583, u'mLatitude': 37.390888099999998, u'mTime': 1422492696.0})(1), prev_pt (AttrDict({'speed': 0.0, u'mLongitude': -122.08306140000001, u'mLatitude': 37.390752800000001, u'mTime': 1422492669.0})) speed = 557.30244939
DEBUG:root:currSpeed < 3670.64082229, retaining index 1
DEBUG:root:while considering point AttrDict({'speed': 1726.7809691505277, u'mLongitude': -122.0827467, u'mLatitude': 37.390439399999998, u'mTime': 1422492729.0})(2), prev_pt (AttrDict({'speed': 557.30244938977273, u'mLongitude': -122.0830583, u'mLatitude': 37.390888099999998, u'mTime': 1422492696.0})) speed = 1726.78096915
DEBUG:root:currSpeed < 3670.64082229, retaining index 2
DEBUG:root:while considering point AttrDict({'speed': 1552.9437219536323, u'mLongitude': -122.0830246, u'mLatitude': 37.3908755, u'mTime': 1422492764.0})(3), prev_pt (AttrDict({'speed': 1726.7809691505277, u'mLongitude': -122.0827467, u'mLatitude': 37.390439399999998, u'mTime': 1422492729.0})) speed = 1552.94372195
DEBUG:root:currSpeed < 3670.64082229, retaining index 3
DEBUG:root:while considering point AttrDict({'speed': 1143.692039630497, u'mLongitude': -122.0834236, u'mLatitude': 37.390841299999998, u'mTime': 1422492795.0})(4), prev_pt (AttrDict({'speed': 1552.9437219536323, u'mLongitude': -122.0830246, u'mLatitude': 37.3908755, u'mTime': 1422492764.0})) speed = 1143.69203963
DEBUG:root:currSpeed < 3670.64082229, retaining index 4
DEBUG:root:while considering point AttrDict({'speed': 805.44557234994636, u'mLongitude': -122.0833117, u'mLatitude': 37.391047499999999, u'mTime': 1422492826.0})(5), prev_pt (AttrDict({'speed': 1143.692039630497, u'mLongitude': -122.0834236, u'mLatitude': 37.390841299999998, u'mTime': 1422492795.0})) speed = 805.44557235
DEBUG:root:currSpeed < 3670.64082229, retaining index 5
DEBUG:root:while considering point AttrDict({'speed': 164.66399228442248, u'mLongitude': -122.0833416, u'mLatitude': 37.391077799999998, u'mTime': 1422492852.0})(6), prev_pt (AttrDict({'speed': 805.44557234994636, u'mLongitude': -122.0833117, u'mLatitude': 37.391047499999999, u'mTime': 1422492826.0})) speed = 164.663992284
DEBUG:root:currSpeed < 3670.64082229, retaining index 6
DEBUG:root:while considering point AttrDict({'speed': 3020.7906226048144, u'mLongitude': -122.0842311, u'mLatitude': 37.390325300000001, u'mTime': 1422492890.0})(7), prev_pt (AttrDict({'speed': 164.66399228442248, u'mLongitude': -122.0833416, u'mLatitude': 37.391077799999998, u'mTime': 1422492852.0})) speed = 3020.7906226
DEBUG:root:currSpeed < 3670.64082229, retaining index 7
DEBUG:root:while considering point AttrDict({'speed': 381.06973324648328, u'mLongitude': -122.0841322, u'mLatitude': 37.390259, u'mTime': 1422492920.0})(8), prev_pt (AttrDict({'speed': 3020.7906226048144, u'mLongitude': -122.0842311, u'mLatitude': 37.390325300000001, u'mTime': 1422492890.0})) speed = 381.069733246
DEBUG:root:currSpeed < 3670.64082229, retaining index 8
DEBUG:root:while considering point AttrDict({'speed': 543.7735388058569, u'mLongitude': -122.0843143, u'mLatitude': 37.390234700000001, u'mTime': 1422492950.0})(9), prev_pt (AttrDict({'speed': 381.06973324648328, u'mLongitude': -122.0841322, u'mLatitude': 37.390259, u'mTime': 1422492920.0})) speed = 543.773538806
DEBUG:root:currSpeed < 3670.64082229, retaining index 9
DEBUG:root:while considering point AttrDict({'speed': 3813.2908661259862, u'mLongitude': -122.08436639999999, u'mLatitude': 37.3891724, u'mTime': 1422492981.0})(10), prev_pt (AttrDict({'speed': 543.7735388058569, u'mLongitude': -122.0843143, u'mLatitude': 37.390234700000001, u'mTime': 1422492950.0})) speed = 3813.29086613
DEBUG:root:currSpeed > 3670.64082229, removing index 10
DEBUG:root:while considering point AttrDict({'speed': 1697.7058794248455, u'mLongitude': -122.085705, u'mLatitude': 37.389889099999998, u'mTime': 1422493065.0})(11), prev_pt (AttrDict({'speed': 543.7735388058569, u'mLongitude': -122.0843143, u'mLatitude': 37.390234700000001, u'mTime': 1422492950.0})) speed = 1119.41957262
DEBUG:root:currSpeed < 3670.64082229, retaining index 11
DEBUG:root:while considering point AttrDict({'speed': 993.31294655875513, u'mLongitude': -122.0857108, u'mLatitude': 37.389942499999997, u'mTime': 1422493071.0})(12), prev_pt (AttrDict({'speed': 1697.7058794248455, u'mLongitude': -122.085705, u'mLatitude': 37.389889099999998, u'mTime': 1422493065.0})) speed = 993.312946559
DEBUG:root:currSpeed < 3670.64082229, retaining index 12
DEBUG:root:while considering point AttrDict({'speed': 1111.0169011073219, u'mLongitude': -122.0857606, u'mLatitude': 37.389972999999998, u'mTime': 1422493076.0})(13), prev_pt (AttrDict({'speed': 993.31294655875513, u'mLongitude': -122.0857108, u'mLatitude': 37.389942499999997, u'mTime': 1422493071.0})) speed = 1111.01690111
DEBUG:root:currSpeed < 3670.64082229, retaining index 13
DEBUG:root:while considering point AttrDict({'speed': 1660.0070761786099, u'mLongitude': -122.0858429, u'mLatitude': 37.390008999999999, u'mTime': 1422493081.0})(14), prev_pt (AttrDict({'speed': 1111.0169011073219, u'mLongitude': -122.0857606, u'mLatitude': 37.389972999999998, u'mTime': 1422493076.0})) speed = 1660.00707618
DEBUG:root:currSpeed < 3670.64082229, retaining index 14
DEBUG:root:while considering point AttrDict({'speed': 956.18321656448688, u'mLongitude': -122.085886, u'mLatitude': 37.390034999999997, u'mTime': 1422493086.0})(15), prev_pt (AttrDict({'speed': 1660.0070761786099, u'mLongitude': -122.0858429, u'mLatitude': 37.390008999999999, u'mTime': 1422493081.0})) speed = 956.183216564
DEBUG:root:currSpeed < 3670.64082229, retaining index 15
DEBUG:root:while considering point AttrDict({'speed': 1005.8208845597222, u'mLongitude': -122.0859435, u'mLatitude': 37.390064299999999, u'mTime': 1422493092.0})(16), prev_pt (AttrDict({'speed': 956.18321656448688, u'mLongitude': -122.085886, u'mLatitude': 37.390034999999997, u'mTime': 1422493086.0})) speed = 1005.82088456
DEBUG:root:currSpeed < 3670.64082229, retaining index 16
DEBUG:root:while considering point AttrDict({'speed': 956.67390650143193, u'mLongitude': -122.0859911, u'mLatitude': 37.390084799999997, u'mTime': 1422493097.0})(17), prev_pt (AttrDict({'speed': 1005.8208845597222, u'mLongitude': -122.0859435, u'mLatitude': 37.390064299999999, u'mTime': 1422493092.0})) speed = 956.673906501
DEBUG:root:currSpeed < 3670.64082229, retaining index 17
DEBUG:root:while considering point AttrDict({'speed': 1227.9980243251143, u'mLongitude': -122.0860522, u'mLatitude': 37.390129899999998, u'mTime': 1422493103.0})(18), prev_pt (AttrDict({'speed': 956.67390650143193, u'mLongitude': -122.0859911, u'mLatitude': 37.390084799999997, u'mTime': 1422493097.0})) speed = 1227.99802433
DEBUG:root:currSpeed < 3670.64082229, retaining index 18
DEBUG:root:while considering point AttrDict({'speed': 1541.1402452154725, u'mLongitude': -122.0861232, u'mLatitude': 37.390191000000002, u'mTime': 1422493109.0})(19), prev_pt (AttrDict({'speed': 1227.9980243251143, u'mLongitude': -122.0860522, u'mLatitude': 37.390129899999998, u'mTime': 1422493103.0})) speed = 1541.14024522
DEBUG:root:currSpeed < 3670.64082229, retaining index 19
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 11 12 13 14 15 16 17 18 19]
Comparing distance 153.978885164 with speed 3783.45841289 * time 153.0 = 578869.137173
Comparing distance 159.8836806 with speed 3783.45841289 * time 159.0 = 601569.88765
filtering points Int64Index([11, 12], dtype='int64')
filtered list size went from (22, 8) to (20, 8)
filtering points Int64Index([11, 12], dtype='int64')
filtered list size went from (22, 8) to (20, 8)
filtering points Int64Index([11, 12], dtype='int64')
INFO:root:Filtering complete, removed indices = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19]
filtered list size went from (22, 8) to (20, 8)
while considering point 1, speed = 557.30244939
currSpeed < 3670, retaining index 1 in existing quality segment
while considering point 2, speed = 1726.78096915
currSpeed < 3670, retaining index 2 in existing quality segment
while considering point 3, speed = 1552.94372195
currSpeed < 3670, retaining index 3 in existing quality segment
while considering point 4, speed = 1143.69203963
currSpeed < 3670, retaining index 4 in existing quality segment
while considering point 5, speed = 805.44557235
currSpeed < 3670, retaining index 5 in existing quality segment
while considering point 6, speed = 164.663992284
currSpeed < 3670, retaining index 6 in existing quality segment
while considering point 7, speed = 3020.7906226
currSpeed < 3670, retaining index 7 in existing quality segment
while considering point 8, speed = 381.069733246
currSpeed < 3670, retaining index 8 in existing quality segment
while considering point 9, speed = 543.773538806
currSpeed < 3670, retaining index 9 in existing quality segment
while considering point 10, speed = 3813.29086613
currSpeed > 3670, starting new quality segment at index 10
while considering point 11, speed = 1697.70587942
currSpeed < 3670, retaining index 11 in existing quality segment
while considering point 12, speed = 993.312946559
currSpeed < 3670, retaining index 12 in existing quality segment
while considering point 13, speed = 1111.01690111
currSpeed < 3670, retaining index 13 in existing quality segment
while considering point 14, speed = 1660.00707618
currSpeed < 3670, retaining index 14 in existing quality segment
while considering point 15, speed = 956.183216564
currSpeed < 3670, retaining index 15 in existing quality segment
while considering point 16, speed = 1005.82088456
currSpeed < 3670, retaining index 16 in existing quality segment
while considering point 17, speed = 956.673906501
currSpeed < 3670, retaining index 17 in existing quality segment
while considering point 18, speed = 1227.99802433
currSpeed < 3670, retaining index 18 in existing quality segment
while considering point 19, speed = 1541.14024522
currSpeed < 3670, retaining index 19 in existing quality segment
Number of quality segments is 2
Considering segments [1, 2, 3, 4, 5, 6, 7, 8, 9] and [10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
About to compare curr_segment duration 128.0 with last segment duration 254.0
curr segment [10, 11, 12, 13, 14, 15, 16, 17, 18, 19] is shorter, cut it
Comparing distance 118.21201685 with speed 3670.64082229 * time 31.0 = 113789.865491
Comparing distance 128.733250851 with speed 3670.64082229 * time 115.0 = 422123.694564
Comparing distance 127.58254021 with speed 3670.64082229 * time 121.0 = 444147.539497
Comparing distance 131.047308676 with speed 3670.64082229 * time 126.0 = 462500.743609
Comparing distance 137.358646776 with speed 3670.64082229 * time 131.0 = 480853.94772
Comparing distance 140.618555753 with speed 3670.64082229 * time 136.0 = 499207.151832
Comparing distance 145.17587796 with speed 3670.64082229 * time 142.0 = 521230.996765
Comparing distance 149.074136229 with speed 3670.64082229 * time 147.0 = 539584.200877
Comparing distance 153.978885164 with speed 3670.64082229 * time 153.0 = 561608.045811
Comparing distance 159.8836806 with speed 3670.64082229 * time 159.0 = 583631.890744
In [52]:
ipy.inline_maps(two_row_list(walk_map_list), len(walk_section_list) * 2, 4)
Out[52]:
In [ ]:
Content source: joshzarrabi/e-mission-server
Similar notebooks: