NNLS (Lawson-Hanson) method in linearized models

Download Report

Transcript NNLS (Lawson-Hanson) method in linearized models

NNLS (Lawson-Hanson) method in linearized models

LSI & NNLS

• LSI = Least square with linear equality constraints min

Ex

f

,

Gx

h

• NNLS = nonnegative least square min

Ex

f

,

x

 0

Flowchart

Initial conditions yes Stopping condition no Manipulate indexes Compute a subproblem finish nonnegativity conditions for the subproblem no Change the solution so that it satisfies the nonegativity conditions yes

Initial conditions

• Sets

Z

and

P

• Variables indexed in the set

Z

are held at value zero • Variables indexed in the set

P

are free to take values different from zero 1 ,...,

n

P

:=NULL

Flowchart

Initial conditions yes Stopping condition no Manipulate indexes Compute a subproblem finish nonnegativity conditions for the subproblem no Change the solution so that it satisfies the nonegativity conditions yes

Stopping condition

• Start of the main loop • Dual vector

w

: 

E T

(

f

• Stopping condition: 

Ex

) set

Z

is empty or

w j

 0 , 

j

Z

Flowchart

Initial conditions yes Stopping condition no Manipulate indexes Compute a subproblem finish nonnegativity conditions for the subproblem no Change the solution so that it satisfies the nonegativity conditions yes

Manipulate indexes

• Based on dual vector, one parameter indexed in

Z

is chosen to be estimated • Index of this parameter is moved from set

Z

to set

P

Flowchart

Initial conditions yes Stopping condition no Manipulate indexes Compute a subproblem finish nonnegativity conditions for the subproblem no Change the solution so that it satisfies the nonegativity conditions yes

Compute subproblem

• Start of the inner loop • Subproblem

E p z

f

where column j of

E p

  

column

0 ,

j of E

,

j

P j

Z

Flowchart

Initial conditions yes Stopping condition no Manipulate indexes Compute a subproblem finish nonnegativity conditions for the subproblem no Change the solution so that it satisfies the nonegativity conditions yes

Nonnegativity conditions

• If

z

satisfies nonnegativity conditions then we set

x:=z

and jump to stopping condition • else continue

Flowchart

Initial conditions yes Stopping condition no Manipulate indexes Compute a subproblem finish nonnegativity conditions for the subproblem no Change the solution so that it satisfies the nonegativity conditions yes

Manipulating the solution

x

is moved towards

z

so that every parameter estimate stays positive. Indexes of estimates that are zero are moved from

P

to

Z

. The new subproblem is solved.

Testing the algorithm

• Ex. Values of polynomial

y

(

x

) 

p

1

x

p

2

x

are calculated at points 2

x=1,2,3,4

with fixed

p 1

• Columns of

E

and

p 2

.

hold the values of polynomial

y(x)=x y

(

x

)  and

x

2

x=1,2,3,4

. • Values of

p 1

and

p 2

are estimated with NNLS.

y

(

x

)  0 .

1

x

 0 .

5

x

2 nnls_test 0.1 (c) 2003 by Turku PET Centre Matrix E: 1 1 2 4 3 9 4 16 Vector f: 0.6 2.2 4.8 8.4 Result vector:0.1 0.5

y

(

x

)

0 .

1

x

0 .

5

x

2 

0 .

13

x

3 nnls_test 0.1 (c) 2003 by Turku PET Centre Matrix E: 1 1 1 2 4 8 3 9 27 4 16 64 Vector f: 0.73 3.24 8.31 16.72 Result vector:0.1 0.5 0.13

y

(

x

)  0 .

1

x

 0 .

5

x

2  0 .

13

x

3  0 

x

4 nnls_test 0.1

Turku PET Centre Matrix E: (c) 2003 1 1 1 1 2 4 8 16 3 9 27 81 4 16 64 256 Vector f: 0.73 3.24 8.31 16.72

Result vector:0.1 0.5 0.13 0 by

y

(

x

)

0 .

1

x

0

x

2 

0 .

13

x

3 nnls_test 0.1

Turku PET Centre Matrix E: (c) 2003 by 1 1 1 2 4 8 3 9 27 4 16 64 Vector f: 0.23 1.24 3.81 8.72

Result vector:0.1 7.26423e-16 0.13

• Kaisa Sederholm: Turku PET Centre Modelling report TPCMOD0020 2003-05-23