2IMA20 Algorithms for Geographic Data Spring 2016 Lecture 6: Segmentation.

Slides:



Advertisements
Similar presentations
Trajectory Segmentation Marc van Kreveld. Algorithms Researchers … … want their problems to be well-defined (fully specified) … care about efficiency.
Advertisements

Introduction to Computer Science 2 Lecture 7: Extended binary trees
Fundamental tools: clustering
Dynamic Graph Algorithms - I
Comp 122, Spring 2004 Binary Search Trees. btrees - 2 Comp 122, Spring 2004 Binary Trees  Recursive definition 1.An empty tree is a binary tree 2.A node.
AVL Trees COL 106 Amit Kumar Shweta Agrawal Slide Courtesy : Douglas Wilhelm Harder, MMath, UWaterloo
Augmenting Data Structures Advanced Algorithms & Data Structures Lecture Theme 07 – Part I Prof. Dr. Th. Ottmann Summer Semester 2006.
Indexing and Range Queries in Spatio-Temporal Databases
On Map-Matching Vehicle Tracking Data
©Silberschatz, Korth and Sudarshan12.1Database System Concepts Chapter 12: Part C Part A:  Index Definition in SQL  Ordered Indices  Index Sequential.
2IL50 Data Structures Spring 2015 Lecture 8: Augmenting Data Structures.
Analysis of Algorithms CS 477/677 Instructor: Monica Nicolescu Lecture 11.
Binary Heaps CSE 373 Data Structures Lecture 11. 2/5/03Binary Heaps - Lecture 112 Readings Reading ›Sections
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
I/O-Algorithms Lars Arge Spring 2009 March 3, 2009.
CSCI 5708: Query Processing I Pusheng Zhang University of Minnesota Feb 3, 2004.
Sequence Alignment Variations Computing alignments using only O(m) space rather than O(mn) space. Computing alignments with bounded difference Exclusion.
Approximation Algorithms for MAX-MIN tiling Authors Piotr Berman, Bhaskar DasGupta, S. Muthukrishman S. Muthukrishman Published on Journal of Algorithms,
1 Database Tuning Rasmus Pagh and S. Srinivasa Rao IT University of Copenhagen Spring 2007 February 8, 2007 Tree Indexes Lecture based on [RG, Chapter.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
Elements of the Heuristic Approach
Indexing. Goals: Store large files Support multiple search keys Support efficient insert, delete, and range queries.
AAU A Trajectory Splitting Model for Efficient Spatio-Temporal Indexing Presented by YuQing Zhang  Slobodan Rasetic Jorg Sander James Elding Mario A.
Target Tracking with Binary Proximity Sensors: Fundamental Limits, Minimal Descriptions, and Algorithms N. Shrivastava, R. Mudumbai, U. Madhow, and S.
Analyzing Encounters using the R package MovementAnalysis and other usages of MovementAnalysis Kevin Buchin Joint work with Stef Sijben, Jean Arseneau,
Optimal Scheduling of File Transfers with Divisible Sizes on Multiple Disjoint Paths Mugurel Ionut Andreica Polytechnic University of Bucharest Computer.
Computational Movement Analysis Lecture 5: Segmentation, Popular Places and Regular Patterns Joachim Gudmundsson.
Database Management 9. course. Execution of queries.
CSCE350 Algorithms and Data Structure Lecture 17 Jianjun Hu Department of Computer Science and Engineering University of South Carolina
Spring 2015 Lecture 11: Minimum Spanning Trees
The X-Tree An Index Structure for High Dimensional Data Stefan Berchtold, Daniel A Keim, Hans Peter Kriegel Institute of Computer Science Munich, Germany.
B-trees and kd-trees Piotr Indyk (slides partially by Lars Arge from Duke U)
CSCI 256 Data Structures and Algorithm Analysis Lecture 14 Some slides by Kevin Wayne copyright 2005, Pearson Addison Wesley all rights reserved, and some.
Query Processing. Steps in Query Processing Validate and translate the query –Good syntax. –All referenced relations exist. –Translate the SQL to relational.
Mehdi Mohammadi March Western Michigan University Department of Computer Science CS Advanced Data Structure.
CSIS7101 – Advanced Database Technologies Spatio-Temporal Data (Part 1) On Indexing Mobile Objects Kwong Chi Ho Leo Wong Chi Kwong Simon Lui, Tak Sing.
CSC 211 Data Structures Lecture 13
2IL50 Data Structures Fall 2015 Lecture 9: Range Searching.
1 Tree Indexing (1) Linear index is poor for insertion/deletion. Tree index can efficiently support all desired operations: –Insert/delete –Multiple search.
Spatio-temporal Pattern Queries M. Hadjieleftheriou G. Kollios P. Bakalov V. J. Tsotras.
Java Methods Big-O Analysis of Algorithms Object-Oriented Programming
A New Framework for Criteria-­based Trajectory Segmentation Kevin Buchin Joint work with Sander Alewijnse, Maike Buchin, Andrea Kölzsch, Helmut Kruckenberg.
Hashing 1 Hashing. Hashing 2 Hashing … * Again, a (dynamic) set of elements in which we do ‘search’, ‘insert’, and ‘delete’ n Linear ones: lists, stacks,
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2010 Lecture 2 Tuesday, 2/2/10 Design Patterns for Optimization.
TU/e Algorithms (2IL15) – Lecture 13 1 Wrap-up lecture.
TU/e Algorithms (2IL15) – Lecture 3 1 DYNAMIC PROGRAMMING
2IL05 Data Structures Spring 2010 Lecture 9: Augmenting Data Structures.
TU/e Algorithms (2IL15) – Lecture 4 1 DYNAMIC PROGRAMMING II
Jeremy Iverson & Zhang Yun 1.  Chapter 6 Key Concepts ◦ Structures and access methods ◦ R-Tree  R*-Tree  Mobile Object Indexing  Questions 2.
2IMA20 Algorithms for Geographic Data Spring 2016 Lecture 5: Simplification.
2IMA20 Algorithms for Geographic Data Spring 2016 Lecture 7: Labeling.
Trajectory Data: Analysis and Patterns Pattern Recognition 2015/2016.
Data Structures – LECTURE Balanced trees
Indexing Structures for Files and Physical Database Design
RE-Tree: An Efficient Index Structure for Regular Expressions
Haim Kaplan and Uri Zwick
Chapter 12: Query Processing
2IMA20 Algorithms for Geographic Data
Spatio-temporal Pattern Queries
Spatial Online Sampling and Aggregation
Chapter 3: The Efficiency of Algorithms
Algorithms (2IL15) – Lecture 2
Indexing and Hashing Basic Concepts Ordered Indices
Ch. 8 Priority Queues And Heaps
2IMG15 Algorithms for Geographic Data
Kinetic Collision Detection for Convex Fat Objects
Richard Anderson Spring 2016
Hashing.
Donghui Zhang, Tian Xia Northeastern University
Presentation transcript:

2IMA20 Algorithms for Geographic Data Spring 2016 Lecture 6: Segmentation

Motivation: Geese Migration  Two behavioural types stopover migration flight  Input: GPS tracks expert description of behaviour  Goal: Delineate stopover sites of migratory geese

Abstract / general purpose questions Single trajectory simplification, cleaning segmentation into semantically meaningful parts finding recurring patterns (repeated subtrajectories) Two trajectories similarity computation subtrajectory similarity Multiple trajectories clustering, outliers flocking/grouping pattern detection finding a typical trajectory or computing a mean/median trajectory visualization

Problem  For analysis, it is often necessary to break a trajectory into pieces according to the behaviour of the entity (e.g., walking, flying, …).  Input: A trajectory T, where each point has a set of attribute values, and a set of criteria.  Attributes: speed, heading, curvature…  Criteria: bounded variance in speed, curvature, direction, distance…  Aim: Partition T into a minimum number of subtrajectories (so-called segments) such that each segment fulfils the criteria.  “Within each segment the points have similar attribute values”

Criteria-Based Segmentation Goal: Partition trajectory into a small number of segments such that a given criterion is fulfilled on each segment

Criteria-Based Segmentation Goal: Partition trajectory into a small number of segments such that a given criterion is fulfilled on each segment

Example  Trajectory T sampled with equal time intervals  Criterion: speed cannot differ more than a factor 2?

Example  Trajectory T sampled with equal time intervals  Criterion: speed cannot differ more than a factor 2?  Criterion: direction of motion differs by at most 90 ⁰ ? speed

Example  Trajectory T sampled with equal time intervals  Criterion: speed cannot differ more than a factor 2?  Criterion: direction of motion differs by at most 90 ⁰ ? speed heading

Example  Trajectory T sampled with equal time intervals  Criterion: speed cannot differ more than a factor 2?  Criterion: direction of motion differs by at most 90 ⁰ ? speed heading speed & heading

Decreasing monotone criteria  Definition: A criterion is decreasing monotone, if it holds on a segment, it holds on any subsegment.  Examples: disk criterion (location), angular range (heading), speed…  Theorem: A combination of conjunctions and disjunctions of decreasing monotone criteria is a decreasing monotone criterion.

Greedy Algorithm Observation: If criteria are decreasing monotone, a greedy strategy works.

TU/e Prerequisites Designing greedy algorithms  try to discover structure of optimal solutions: what properties do optimal solutions have ?  what are the choices that need to be made ?  do we have optimal substructure ? optimal solution = first choice + optimal solution for subproblem  do we have greedy-choice property for the first choice ?  prove that optimal solutions indeed have these properties  prove optimal substructure and greedy-choice property  use these properties to design an algorithm and prove correctness  proof by induction (possible because optimal substructure)

TU/e Prerequisites standard text you can basically use in proof for any greedy-choice property quality OPT* ≥ quality OPT here comes the modification, which is problem-specific

Greedy Algorithm Observation: If criteria are decreasing monotone, a greedy strategy works. For many decreasing monotone criteria Greedy requires O(n) time, e.g. for speed, heading…

Greedy Algorithm Observation: For some criteria, iterative double & search is faster. Double & search: An exponential search followed by a binary search.

Criteria-Based Segmentation Boolean or linear combination of decreasing monotone criteria Greedy Algorithm incremental in O(n) time or constant-update criteria e.g. bounds on speed or heading double & search in O(n log n) time for non-constant update criteria [M.Buchin et al.’11]

Motivation: Geese Migration  Two behavioural types stopover migration flight  Input: GPS tracks expert description of behaviour  Goal: Delineate stopover sites of migratory geese

Case Study: Geese Migration Data  Spring migration tracks White-fronted geese 4-5 positions per day March – June  Up to 10 stopovers during spring migration Stopover: 48 h within radius 30 km Flight: change in heading <120° Kees Adri

Comparison manual computed

Evaluation Few local differences: Shorter stops, extra cuts in computed segmentation

 A combination of decreasing and increasing monotone criteria stopover migration flight Criteria Within radius 30km At least 48h AND Change in heading <120° OR

Decreasing and Increasing Monotone Criteria  Observation: For a combination of decreasing and increasing monotone criteria the greedy strategy does not always work.  Example: Min duration 2 AND Max speed range 4 speed 1 5

Non-Monotone Segmentation Many Criteria are not (decreasing) monotone:  Minimum time  Standard deviation  Fixed percentage of outliers  For these Aronov et al. introduced the start-stop diagram Example: Geese Migration

Start-Stop Diagram input trajectory compute start-stop diagram compute segmentation Algorithmic approach

Start-Stop Diagram Given a trajectory T over time interval I = {t 0,…,t  } and criterion C The start-stop diagram D is (the upper diagonal half of) the n x n grid, where each point (i,j) is associated to segment [t i,t j ] with (i,j) is in free space if C holds on [t i,t j ] (i,j) is in forbidden space if C does not hold on [t i,t j ] A (minimal) segmentation of T corresponds to a (min-link) staircase in D free space forbidden space staircase

Start-Stop Diagram A (minimal) segmentation of T corresponds to a (min-link) staircase in D

Start-Stop Diagram A (minimal) segmentation of T corresponds to a (min-link) staircase in D

Start-Stop Diagram Discrete case: A non-monotone segmentation can be computed in O(n 2 ) time

Start-Stop Diagram Discrete case: A non-monotone segmentation can be computed in O(n 2 ) time

Stable Criteria

Compressed Start-Stop Diagram For stable criteria the start-stop diagram can be compressed by applying run-length encoding. Examples: increasing monotonedecreasing monotone 9

Computing the Compressed Start-Stop Diagram ij 9

For a decreasing criterion ComputeLongestValid(crit C, traj T): Move two pointers i,j from n to 0 over the trajectory ij Requires a data structure for segment [t i,t j ] allowing the operations isValid, extend, and shorten, e.g., a balanced binary search tree on attribute values for range or bound criteria. Runs in O(n  c(n)) time where c(n) is the time to update & query. Analogously for increasing criteria. 9

Computing the Compressed Start-Stop Diagram The start-stop diagram of a conjunction (or disjunction) of two stable criteria is their intersection (or union). The start-stop diagram of a negated criteria is its inverse. The corresponding compressed start-stop diagrams can be computed in O(n) time. 9

Attributes and criteria Examples of stable criteria  Lower bound/Upper bound on attribute  Angular range criterion  Disk criterion  Allow an approximate fraction of outliers  …

Computing the Optimal Segmentation Observation: The optimal segmentation for [0,i] is either one segment, or an optimal sequence of segments for [0,j<i] appended with a segment [j,i], where j is an index such [j,i] is valid. Dynamic programming algorithm for each row from 0 to n find white cell with min-link That is, iteratively compute a table S[0,n] where entry S[i] for row i stores last: index of last link count: number of links so far  runs in O(n 2 ) time S 0 n nil, 0 nil, ∞ 0, 0+1=1 0, 1 7, 2 8, 3 10, 4

Computing the Optimal Segmentation T [Alewijnse et al.’14]  More efficient dynamic programming algorithm for compressed diagrams  Process blocks of white cells using a range query in a binary search tree T (instead of table S) storing index: row index last: index of last link count: number of links so far  augmented by minimal count in subtree

TU/e Prerequisites Methodology for augmenting a data structure  Choose an underlying data structure.  Determine additional information to maintain.  Verify that we can maintain additional information for existing data structure operations.  Develop new operations.  R-B tree  min-count[x]  theorem next slide  count(block) using range query

TU/e Prerequisites Theorem Augment a R-B tree with field f, where f[x] depends only on information in x, left[x], and right[x] (including f[left[x]] and f[right[x]]). Then can maintain values of f in all nodes during insert and delete without affecting O(log n) performance. When we alter information in x, changes propagate only upward on the search path for x …

Computing the Optimal Segmentation T [Alewijnse et al.’14]  More efficient dynamic programming algorithm for compressed diagrams  Process blocks of white cells using a range query in a binary search tree T (instead of table S) storing index: row index last: index of last link count: number of links so far  augmented by minimal count in subtree  runs in O(n log n) time

Beyond criteria-based segmentation  When is criteria-based segmentation applicable?  What can we do in other cases?

Excursion: Movement Models

Movement Models  Movement data: sequence of observations, e.g. (x i,y i,t i )  Linear movement realistic?

Movement Models  Movement data: sequence of observations, e.g. (x i,y i,t i )  Linear movement realistic?  Space-time Prisms

Movement Models  Movement data: sequence of observations, e.g. (x i,y i,t i )  Linear movement realistic?  Space-time Prisms

Movement Models  Movement data: sequence of observations, e.g. (x i,y i,t i )  Linear movement realistic?  Space-time Prisms

Movement Models  Movement data: sequence of observations, e.g. (x i,y i,t i )  Linear movement realistic?  Space-time Prisms  Random Motion Models (e.g. Brownian bridges)

Movement Models  Movement data: sequence of observations, e.g. (x i,y i,t i )  Linear movement realistic?  Space-time Prisms  Random Motion Models (e.g. Brownian bridges)

Brownian Bridges - Examples Brownian bridgesno bridges

Segment by diffusion coefficient

Summary  Greedy algorithm for decreasing monotone criteria O(n) or O(n log n) time [M.Buchin, Driemel, van Kreveld, Sacristan, 2010]  Case Study: Geese Migration [M.Buchin, Kruckenberg, Kölzsch, 2012]  Start-stop diagram for arbitrary criteria O(n 2 ) time [Aronov, Driemel, van Kreveld, Löffler, Staals, 2012]  Compressed start-stop diagram for stable criteria O(n log n) time [Alewijnse, Buchin, Buchin, Sijben, Westenberg, 2014] 53

References  S. Alewijnse, T. Bagautdinov, M. de Berg, Q. Bouts, A. ten Brink, K. Buchin and M. Westenberg. Progressive Geometric Algorithms. SoCG,  M. Buchin, A. Driemel, M. J. van Kreveld and V. Sacristan. Segmenting trajectories: A framework and algorithms using spatiotemporal criteria. Journal of Spatial Information Science,  B. Aronov, A. Driemel, M. J. Kreveld, M. Loffler and F. Staals. Segmentation of Trajectories for Non-Monotone Criteria. SODA,  M. Buchin, H. Kruckenberg and A. Kölzsch. Segmenting Trajectories based on Movement States. SDH, References