1 / 33

Dynamic Programming Tutorial

Dynamic Programming Tutorial. Elaine Chew QMUL: ELE021/ELED021/ELEM021 26 March 2012. Sources. Hillier, F. S. & G. J. Lieberman. Introduction to Operations Research. Chapter 11: Dynamic Programming, 7 th , 8 th , 9 th editions, McGraw-Hill.

noleta
Télécharger la présentation

Dynamic Programming Tutorial

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Dynamic Programming Tutorial Elaine Chew QMUL: ELE021/ELED021/ELEM021 26 March 2012

  2. Sources • Hillier, F. S. & G. J. Lieberman. Introduction to Operations Research. Chapter 11: Dynamic Programming, 7th, 8th, 9th editions, McGraw-Hill. • Dixon, S. & Widmer, G. (2005). MATCH: A Music Alignment Tool Chest. In Proceedings of the 6thIntl Conf on Music Information Retrieval, London, UK, 492-497. • Yang, A., E. Chew & A. Volk (2005). A Dynamic Programming Approach to Adaptive Tatum Assignment for Rhythm Transcription. In Proceedings of the 1st IEEE Intl Wkshop on Multimedia Information Processing and, Irvine, CA, 577-584.

  3. Sources • Hillier, F. S. & G. J. Lieberman. Introduction to Operations Research. Chapter 11: Dynamic Programming, 7th, 8th, 9th editions, McGraw-Hill. • Dixon, S. & Widmer, G. (2005). MATCH: A Music Alignment Tool Chest. In Proceedings of the 6thIntl Conf on Music Information Retrieval, London, UK, 492-497. • Yang, A., E. Chew & A. Volk (2005). A Dynamic Programming Approach to Adaptive Tatum Assignment for Rhythm Transcription. In Proceedings of the 1st IEEE Intl Wkshop on Multimedia Information Processing and, Irvine, CA, 577-584.

  4. Shortest Path Problem • V = set of vertices (or nodes) • E = set of edges (or arcs), including s (source) and t (sink) • C = [cij] = set of arc costs • X = indicator variable for whether arc ij is used • Linear Programming Problem Formulation: Min Σijcijxij s.t. Σixij= 1 Σjxij= 1 0 ≤ xij≤ 1

  5. Gringott’s Wizarding Bank Exit to Charing Cross Road Quality Quidditch Supplies Entrance to Wizarding World 7 C M R Q E O G 2 2 5 Ollivander’s 5 4 3 4 1 1 7 4 Magical Menagerie The Leaky Cauldron Hogwarts (Shortest Path) Example • Determine which route from entrance to exit has the shortest distance

  6. Algorithm • At iteration i • Objective: find the i-th nearest node to the origin • Input: i-1 nearest node to the origin, shortest path and distance • Candidates for i-th nearest node: nearest unsolved node to one solved • Calculation for i-th nearest node: for each new candidate, add new edge to previously found shortest path to thei-1-th nearest node. Among the new candidates, the node with shortest distance becomes the i-th nearest node.

  7. Implementation

  8. 7 C R Q E O G M 2 2 5 5 4 3 4 1 1 7 4 Hogwarts (Shortest Path) Example 0

  9. Implementation

  10. 7 M Q E O G C R 0 2 2 5 5 5 4 3 4 1 1 7 4 Hogwarts (Shortest Path) Example

  11. Implementation

  12. 7 C R Q E O G M 2 2 5 5 4 3 4 1 1 7 4 Hogwarts (Shortest Path) Example 0 5 6

  13. Implementation

  14. 7 C R Q E O G M 2 2 5 5 4 3 4 1 1 7 4 Hogwarts (Shortest Path) Example 0 5 9 6

  15. Implementation

  16. 7 G R Q E O M C 2 2 5 5 4 3 4 1 1 7 4 Hogwarts (Shortest Path) Example 0 5 9 10 6

  17. Implementation

  18. 7 G R Q E O M C 2 2 5 5 4 3 4 1 1 7 4 Hogwarts (Shortest Path) Example 11 0 5 9 10 6

  19. Implementation

  20. Implementation

  21. 7 O R Q E G M C 2 2 5 5 4 3 4 1 1 7 4 Hogwarts (Shortest Path) Example 11 0 5 9 13 10 6

  22. Sources • Hillier, F. S. & G. J. Lieberman. Introduction to Operations Research. Chapter 11: Dynamic Programming, 7th, 8th, 9th editions, McGraw-Hill. • Dixon, S. & Widmer, G. (2005). MATCH: A Music Alignment Tool Chest. In Proceedings of the 6thIntl Conf on Music Information Retrieval, London, UK, 492-497. • Yang, A., E. Chew & A. Volk (2005). A Dynamic Programming Approach to Adaptive Tatum Assignment for Rhythm Transcription. In Proceedings of the 1st IEEE Intl Wkshop on Multimedia Information Processing and, Irvine, CA, 577-584.

  23. Dynamic Time Warping

  24. Euclidean Distance

  25. Sources • Hillier, F. S. & G. J. Lieberman. Introduction to Operations Research. Chapter 11: Dynamic Programming, 7th, 8th, 9th editions, McGraw-Hill. • Dixon, S. & Widmer, G. (2005). MATCH: A Music Alignment Tool Chest. In Proceedings of the 6thIntl Conf on Music Information Retrieval, London, UK, 492-497. • Yang, A., E. Chew & A. Volk (2005). A Dynamic Programming Approach to Adaptive Tatum Assignment for Rhythm Transcription. In Proceedings of the 1st IEEE Intl Wkshop on Multimedia Information Processing and, Irvine, CA, 577-584.

  26. Tatum Segmentation • Tatum = smallest perceptual time unit in music

  27. 140 Coarse Manual Segmentation bepthq3 120 son08_3 100 Tatum 80 60 40 0 100 200 300 400 Beats Example Results

  28. Segmentation • Example of tatum selection • Input: • Note onset times, O(1,n) = {O1, O2,…, On} • Output: • Segmentation points, S = {S1, S2,…,Sm} • Optimal tatum in each segment

  29. Remainder Squared Error p o(1) … o(j) 1 … j j+1 p

  30. ERR(.) The error incurred by a tatum assignment, p, for onsets O(i+ 1,k) is given by the remainder squared error (RSE) function: where oj (= Oj+1 – Oj) is the inter onset interval (IOI) between onsets j and j+1.

  31. Optimal Segmentation • Define OPT(k) to be the best segmentation (cost) for a given set of onsets O(1,k): where ERR(.) returns the error incurred by the best tatum assignment for the set of onsets O(i+1,k). k i i+1 … 1 …

More Related