Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
courses:cs211:winter2012:journals:jeanpaul:chaptersixsectioniii [2012/03/28 02:24] – [The Problem] mugabejcourses:cs211:winter2012:journals:jeanpaul:chaptersixsectioniii [2012/03/28 02:30] – [The Problem] mugabej
Line 27: Line 27:
 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> For each segment, the error value of the optimal line through that segment.\\ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> For each segment, the error value of the optimal line through that segment.\\
 >>>>>>>>>>>>>>>>>> Our goal is to find the a partition of minimum penalty.\\ >>>>>>>>>>>>>>>>>> Our goal is to find the a partition of minimum penalty.\\
 +=====  Designing the Algorithm =====
 +
 +>>>>>>>>>>>>>>>>>> INPUT: n, p<sub>1</sub>,...,p<sub>N</sub>, C\\
 +>>>>>>>>>>>>>>>>>> Segmented-Least-Squares()\\
 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> M[0] = 0\\
 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> e[0][0] = 0\\
 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> for j = 1 to n\\
 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> for i = 1 to j\\
 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> e[i][j] = least square error for the segment p<sub>i</sub>,...,p<sub>j</sub>\\
 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> for j = 1 to n\\
 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> M[j] = min <sub>1 ≤ i ≤ j</sub> (e[i][j] + c + M[i-1])\\
 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> return M[n]
  
courses/cs211/winter2012/journals/jeanpaul/chaptersixsectioniii.txt · Last modified: 2012/03/28 02:39 by mugabej
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0