Top Banner
1 Announcements: The deadline for grad lecture notes was extended to Friday Nov. 9 at 3:30pm. Assignment #4 is posted: Due Thurs. Nov. 15. Nov. 12-14 is reading break. I plan on holding a Test #2 tutorial on Thurs. Nov. 15 during class. Test #2 is on Mon. Nov. 19, in class. Mandatory attendance starts Wed. Nov. 21.
15

1 Announcements: The deadline for grad lecture notes was extended to Friday Nov. 9 at 3:30pm. Assignment #4 is posted: Due Thurs. Nov. 15. Nov. 12-14 is.

Jan 04, 2016

Download

Documents

Valentine Todd
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 Announcements: The deadline for grad lecture notes was extended to Friday Nov. 9 at 3:30pm. Assignment #4 is posted: Due Thurs. Nov. 15. Nov. 12-14 is.

1

Announcements:The deadline for grad lecture notes was extended to Friday Nov. 9 at 3:30pm.

Assignment #4 is posted: Due Thurs. Nov. 15.

Nov. 12-14 is reading break.I plan on holding a Test #2 tutorial on Thurs. Nov. 15 during class.

Test #2 is on Mon. Nov. 19, in class.Mandatory attendance starts Wed. Nov. 21.

A handout for the integer programming material was given out in class.

Page 2: 1 Announcements: The deadline for grad lecture notes was extended to Friday Nov. 9 at 3:30pm. Assignment #4 is posted: Due Thurs. Nov. 15. Nov. 12-14 is.

Curve Fitting: from Ian Barrodale’s talk

L1-norm: Minimize sum of the absolute values of the differences between the function values and the linear approximation of the function.

L-norm: Minimize the absolute value of the maximum difference between the function value and the linear approximation.

2

Page 3: 1 Announcements: The deadline for grad lecture notes was extended to Friday Nov. 9 at 3:30pm. Assignment #4 is posted: Due Thurs. Nov. 15. Nov. 12-14 is.

3

x y L1-fit Lerror

L-fit Lerror1 11 7 4 9 1 2 18 19 -1 3 29 30 -14 42 40 2 40 1

L1: y= -4 + 11x Error= 4 + 0 + 0 + 2 = 6L: y= -1 + 10 x Error= Max{ |5/3|, |-5/3|, |-1|, |5/3|} = 5/3

Page 4: 1 Announcements: The deadline for grad lecture notes was extended to Friday Nov. 9 at 3:30pm. Assignment #4 is posted: Due Thurs. Nov. 15. Nov. 12-14 is.

4

0.5 1 1.5 2 2.5 3 3.5 4 4.50

5

10

15

20

25

30

35

40

45

Data pointsL infinity fitL1 fit

Page 5: 1 Announcements: The deadline for grad lecture notes was extended to Friday Nov. 9 at 3:30pm. Assignment #4 is posted: Due Thurs. Nov. 15. Nov. 12-14 is.

5

How do we formulate the fitting problem as a linear program for each of these norms?In both cases we want to find a0 and a1 so that the linear approximation is:y= a0 + a1 x = a0 1 + a1 x

x y

1 112 183 294 42

Page 6: 1 Announcements: The deadline for grad lecture notes was extended to Friday Nov. 9 at 3:30pm. Assignment #4 is posted: Due Thurs. Nov. 15. Nov. 12-14 is.

6

L1-norm: minimize the sum of the absolute values of the differences.Minimize |d1 |+ |d2 |+ |d3 |+ | d4 |subject tod1 = 11 – (a0 1+ a1 1) d2 = 18 – (a0 1+ a1 2) d3 = 29 – (a0 1+ a1 3) d4 = 42 – (a0 1+ a1 4) This is not in standard form.

x y

1 112 183 294 42

Page 7: 1 Announcements: The deadline for grad lecture notes was extended to Friday Nov. 9 at 3:30pm. Assignment #4 is posted: Due Thurs. Nov. 15. Nov. 12-14 is.

7

To manage the absolute values:Minimize |d1 |+ |d2 |+ |d3 |+ | d4 |= u1 + v1 + u2 + v2 + u3 + v3 + u4 + v4subject tod1 = u1 – v1 = 11 – (a0 1+ a1 1) d2 = u2 – v2 = 18 – (a0 1+ a1 2) d3 = u3 – v3 = 29 – (a0 1+ a1 3) d4 = u4 – v4 = 42 – (a0 1+ a1 4)u1, u2, u3, u4 ≥ 0v1, v2, v3, v4 ≥ 0The value of ui is > 0 if di is strictly positive.The value of vi is > 0 if di is strictly negative.

Page 8: 1 Announcements: The deadline for grad lecture notes was extended to Friday Nov. 9 at 3:30pm. Assignment #4 is posted: Due Thurs. Nov. 15. Nov. 12-14 is.

8

Change to Maximize:Minimize u1 + v1 + u2 + v2 + u3 + v3 + u4 + v4becomes Maximize -u1 - v1 - u2 - v2 - u3 - v3 - u4 - v4

Page 9: 1 Announcements: The deadline for grad lecture notes was extended to Friday Nov. 9 at 3:30pm. Assignment #4 is posted: Due Thurs. Nov. 15. Nov. 12-14 is.

9

Missing non-negativity constraints on the a0 and a1:u1 – v1 = 11 – (a0 1+ a1 1) u2 – v2 = 18 – (a0 1+ a1 2) u3 – v3 = 29 – (a0 1+ a1 3) u4 – v4 = 42 – (a0 1+ a1 4)Set a0= b0-c0Set a1= b1-c1b0, b1, c0, c1 ≥ 0

Page 10: 1 Announcements: The deadline for grad lecture notes was extended to Friday Nov. 9 at 3:30pm. Assignment #4 is posted: Due Thurs. Nov. 15. Nov. 12-14 is.

10

Maximize 0 b0 + 0 c0 + 0 b1 + 0 c1-u1 - v1 - u2 - v2 - u3 - v3 - u4 - v4subject tou1 – v1 = 11 – ( (b0 – c0) 1+ (b1 – c1) 1) u2 – v2 = 18 – ( (b0 – c0) 1+ (b1 – c1) 2) u3 – v3 = 29 – ( (b0 – c0) 1+ (b1 – c1) 3) u4 – v4 = 42 – ( (b0 – c0) 1+ (b1 – c1) 4)Finally, change each equality constraint:u1 – v1 ≤ 11 – ( (b0 – c0) 1+ (b1 – c1) 1) u1 – v1 ≥ 11 – ( (b0 – c0) 1+ (b1 – c1) 1) ⟹-u1 + v1 ≤ - 11 + ( (b0 – c0) 1+ (b1 – c1) 1)

Page 11: 1 Announcements: The deadline for grad lecture notes was extended to Friday Nov. 9 at 3:30pm. Assignment #4 is posted: Due Thurs. Nov. 15. Nov. 12-14 is.

11

The L1-norm:The result from running my program.The optimal solution: -6.0[So the error is 6]X1= b0 = 0 X2 = c0 = 4 X3= b1 = 11 X4 = c1 = 0a0= b0-c0= -4a1= b1-c1= 11So the curve isy = -4 + 11 x

Page 12: 1 Announcements: The deadline for grad lecture notes was extended to Friday Nov. 9 at 3:30pm. Assignment #4 is posted: Due Thurs. Nov. 15. Nov. 12-14 is.

12

The L-norm:Minimize w = Max{|d1 |, |d2 |, |d3 |, | d4 |}subject tod1 = u1 – v1 = 11 – (a0 1+ a1 1) d2 = u2 – v2 = 18 – (a0 1+ a1 2) d3 = u3 – v3 = 29 – (a0 1+ a1 3) d4 = u4 – v4 = 42 – (a0 1+ a1 4)w ≥ |d1 |: w ≥ u1 and w ≥ v1 w ≥ |d2 |: w ≥ u2 and w ≥ v2 w ≥ |d3 |: w ≥ u3 and w ≥ v3 w ≥ |d4 |: w ≥ u4 and w ≥ v4 u1, u2, u3, u4 ≥ 0, v1, v2, v3, v4 ≥ 0

Page 13: 1 Announcements: The deadline for grad lecture notes was extended to Friday Nov. 9 at 3:30pm. Assignment #4 is posted: Due Thurs. Nov. 15. Nov. 12-14 is.

13

The L-norm:The result from running my program.The optimal solution: -1.666667[So the error is 1 ]X1= b0 = 0 X2 = c0 = 1 X3= b1 = 10 X4 = c1 = 0a0= b0-c0= -1a1= b1-c1= 10 So the curve isy = -1 + 10 x

Page 14: 1 Announcements: The deadline for grad lecture notes was extended to Friday Nov. 9 at 3:30pm. Assignment #4 is posted: Due Thurs. Nov. 15. Nov. 12-14 is.

14

x y L1-fit Lerror

L-fit Lerror1 11 7 4 9 1 2 18 19 -1 3 29 30 -14 42 40 2 40 1

L1: y= -4 + 11x Error= 4 + 0 + 0 + 2 = 6L: y= -1 + 10 x Error= Max{ |5/3|,|-5/3|, |-1|, |5/3|} = 5/3

Page 15: 1 Announcements: The deadline for grad lecture notes was extended to Friday Nov. 9 at 3:30pm. Assignment #4 is posted: Due Thurs. Nov. 15. Nov. 12-14 is.

15

0.5 1 1.5 2 2.5 3 3.5 4 4.50

5

10

15

20

25

30

35

40

45

Data pointsL infinity fitL1 fit