111
Validated Numerics a short introduction to rigorous computations Warwick Tucker The CAPA group Department of Mathematics Uppsala University, Sweden

Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Validated Numericsa short introduction to rigorous computations

Warwick Tucker

The CAPA group

Department of Mathematics

Uppsala University, Sweden

Page 2: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Are floating point computations reliable?

Computing with the C/C++ single format

Page 3: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Are floating point computations reliable?

Computing with the C/C++ single format

Example 1: Repeated addition

103∑

i=1

〈10−3〉 = 0.999990701675415,

104∑

i=1

〈10−4〉 = 1.000053524971008.

Page 4: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Are floating point computations reliable?

Computing with the C/C++ single format

Example 1: Repeated addition

103∑

i=1

〈10−3〉 = 0.999990701675415,

104∑

i=1

〈10−4〉 = 1.000053524971008.

Example 2: Order of summation

1 +1

2+

1

3+ · · ·+ 1

106= 14.357357,

1

106+ · · ·+ 1

3+

1

2+ 1 = 14.392651.

Page 5: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Are floating point computations reliable?

Given the point (x, y) = (77617, 33096), evaluate the function

f(x, y) = 333.75y6 + x2(11x2y2 − y6 − 121y4 − 2) + 5.5y8 + x/(2y)

Page 6: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Are floating point computations reliable?

Given the point (x, y) = (77617, 33096), evaluate the function

f(x, y) = 333.75y6 + x2(11x2y2 − y6 − 121y4 − 2) + 5.5y8 + x/(2y)

IBM S/370 (β = 16) with FORTRAN:

type p f(x, y)

REAL*4 24 1.172603 . . .

REAL*8 53 1.1726039400531 . . .

REAL*10 64 1.172603940053178 . . .

Page 7: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Are floating point computations reliable?

Given the point (x, y) = (77617, 33096), evaluate the function

f(x, y) = 333.75y6 + x2(11x2y2 − y6 − 121y4 − 2) + 5.5y8 + x/(2y)

IBM S/370 (β = 16) with FORTRAN:

type p f(x, y)

REAL*4 24 1.172603 . . .

REAL*8 53 1.1726039400531 . . .

REAL*10 64 1.172603940053178 . . .

Pentium III (β = 2) with C/C++ (gcc/g++):

type p f(x, y)

float 24 178702833214061281280

double 53 178702833214061281280

long double 64 178702833214061281280

Page 8: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Are floating point computations reliable?

Given the point (x, y) = (77617, 33096), evaluate the function

f(x, y) = 333.75y6 + x2(11x2y2 − y6 − 121y4 − 2) + 5.5y8 + x/(2y)

IBM S/370 (β = 16) with FORTRAN:

type p f(x, y)

REAL*4 24 1.172603 . . .

REAL*8 53 1.1726039400531 . . .

REAL*10 64 1.172603940053178 . . .

Pentium III (β = 2) with C/C++ (gcc/g++):

type p f(x, y)

float 24 178702833214061281280

double 53 178702833214061281280

long double 64 178702833214061281280

Correct answer: −0.8273960599 . . .

Page 9: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

How do we control rounding errors?

Round each partial result both ways

If x, y ∈ F and ⋆ ∈ {+,−,×,÷}, we can enclose the exact resultin an interval:

x ⋆ y ∈ [▽(x ⋆ y),△(x ⋆ y)].

Page 10: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

How do we control rounding errors?

Round each partial result both ways

If x, y ∈ F and ⋆ ∈ {+,−,×,÷}, we can enclose the exact resultin an interval:

x ⋆ y ∈ [▽(x ⋆ y),△(x ⋆ y)].

Since all (modern) computers round with maximal quality, theinterval is the smallest one that contains the exact result.

Page 11: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

How do we control rounding errors?

Round each partial result both ways

If x, y ∈ F and ⋆ ∈ {+,−,×,÷}, we can enclose the exact resultin an interval:

x ⋆ y ∈ [▽(x ⋆ y),△(x ⋆ y)].

Since all (modern) computers round with maximal quality, theinterval is the smallest one that contains the exact result.

Question

How do we compute with intervals? And why, really?

Page 12: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Arithmetic over IR

Definition

If ⋆ is one of the operators +,−,×,÷, and if a, b ∈ IR, then

a ⋆ b = {a ⋆ b : a ∈ a, b ∈ b},

except that a÷ b is undefined if 0 ∈ b.

Page 13: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Arithmetic over IR

Definition

If ⋆ is one of the operators +,−,×,÷, and if a, b ∈ IR, then

a ⋆ b = {a ⋆ b : a ∈ a, b ∈ b},

except that a÷ b is undefined if 0 ∈ b.

Simple arithmetic

a+ b = [a+ b,a+ b]

a− b = [a− b,a− b]

a× b = [min{ab,ab,ab,ab},max{ab,ab,ab,ab}]a÷ b = a× [1/b, 1/b], if 0 /∈ b.

Page 14: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Arithmetic over IR

Definition

If ⋆ is one of the operators +,−,×,÷, and if a, b ∈ IR, then

a ⋆ b = {a ⋆ b : a ∈ a, b ∈ b},

except that a÷ b is undefined if 0 ∈ b.

Simple arithmetic

a+ b = [a+ b,a+ b]

a− b = [a− b,a− b]

a× b = [min{ab,ab,ab,ab},max{ab,ab,ab,ab}]a÷ b = a× [1/b, 1/b], if 0 /∈ b.

On a computer we use directed rounding, e.g.a+ b = [▽(a⊕ b),△(a ⊕ b)].

Page 15: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Interval-valued functions

Range enclosure

Extend a real-valued function f to an interval-valued F :

R(f ;x) = {f(x) : x ∈ x} ⊆ F (x)

Page 16: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Interval-valued functions

Range enclosure

Extend a real-valued function f to an interval-valued F :

R(f ;x) = {f(x) : x ∈ x} ⊆ F (x)

x

f(x)

x

F (x)

Page 17: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Interval-valued functions

Range enclosure

Extend a real-valued function f to an interval-valued F :

R(f ;x) = {f(x) : x ∈ x} ⊆ F (x)

x

f(x)

x

F (x)

y /∈ F (x) implies that f(x) 6= y for all x ∈ x.

Page 18: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Interval-valued functions

Some explicit formulas are given below:

Page 19: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Interval-valued functions

Some explicit formulas are given below:

ex = [ex, ex]√x = [

√x,

√x] if 0 ≤ x

logx = [logx, logx] if 0 < x

arctanx = [arctanx, arctanx] .

Page 20: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Interval-valued functions

Some explicit formulas are given below:

ex = [ex, ex]√x = [

√x,

√x] if 0 ≤ x

logx = [logx, logx] if 0 < x

arctanx = [arctanx, arctanx] .

Set S+ = {2kπ + π/2: k ∈ Z} and S− = {2kπ − π/2: k ∈ Z}.Then sinx is given by

[−1, 1] : if x ∩ S− 6= ∅ and x ∩ S+ 6= ∅,[−1,max{sinx, sinx}] : if x ∩ S− 6= ∅ and x ∩ S+ = ∅,[min{sinx, sinx}, 1] : if x ∩ S− = ∅ and x ∩ S+ 6= ∅,[min{sinx, sinx},max{sinx, sinx}] : if x ∩ S− = ∅ and x ∩ S+ = ∅.

Page 21: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Graph Enclosures

A controlled discretization

We can now select and adapt the level of discretization

Page 22: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Graph Enclosures

A controlled discretization

We can now select and adapt the level of discretization

−5 −4 −3 −2 −1 0 1 2 3 4 5−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

−5

0

5

−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

0

1

2

3

4

x

f(x)

f(x) = cos(x)3 + sin(x)

Various levels of discretization of f(x) = cos3 x+ sinx.

Page 23: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Solving non-linear equations

Page 24: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Solving non-linear equations

Consider everything. Keep what is good.

Avoid evil whenever you recognize it.

St. Paul, ca. 50 A.D. (The Bible, 1 Thess. 5:21-22)

Page 25: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Solving non-linear equations

Consider everything. Keep what is good.

Avoid evil whenever you recognize it.

St. Paul, ca. 50 A.D. (The Bible, 1 Thess. 5:21-22)

No solutions can be missed!

Page 26: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Solving non-linear equation

The code is transparent and natural

01 function bisect(fcnName, X, tol)

02 f = inline(fcnName);

03 if ( 0 <= f(X) ) % If f(X) contains zero...

04 if Diam(X) < tol % and the tolerance is met...

05 X % print the interval X.

06 else % Otherwise, divide and conquer.

07 bisect(fcnName, interval(Inf(X), Mid(X)), tol);

08 bisect(fcnName, interval(Mid(X), Sup(X)), tol);

09 end

10 end

Page 27: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Solving non-linear equation

The code is transparent and natural

01 function bisect(fcnName, X, tol)

02 f = inline(fcnName);

03 if ( 0 <= f(X) ) % If f(X) contains zero...

04 if Diam(X) < tol % and the tolerance is met...

05 X % print the interval X.

06 else % Otherwise, divide and conquer.

07 bisect(fcnName, interval(Inf(X), Mid(X)), tol);

08 bisect(fcnName, interval(Mid(X), Sup(X)), tol);

09 end

10 end

Nice property

If F is well-defined on the domain, the algorithm produces anenclosure of all zeros of f . [No existence is established, however.]

Page 28: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Existence and uniqueness

Existence and uniqueness require fixed point theorems.

Page 29: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Existence and uniqueness

Existence and uniqueness require fixed point theorems.

Brouwer’s fixed point theorem

Let B be homeomorhpic to the closed unit ball in Rn. Then given

any continuous mapping f : B → B there exists x ∈ B such thatf(x) = x.

Page 30: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Existence and uniqueness

Existence and uniqueness require fixed point theorems.

Brouwer’s fixed point theorem

Let B be homeomorhpic to the closed unit ball in Rn. Then given

any continuous mapping f : B → B there exists x ∈ B such thatf(x) = x.

Schauder’s fixed point theorem

Let X be a normed vector space, and let K ⊂ X be a non-empty,compact, and convex set. Then given any continuous mappingf : K → K there exists x ∈ K such that f(x) = x.

Page 31: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Existence and uniqueness

Existence and uniqueness require fixed point theorems.

Brouwer’s fixed point theorem

Let B be homeomorhpic to the closed unit ball in Rn. Then given

any continuous mapping f : B → B there exists x ∈ B such thatf(x) = x.

Schauder’s fixed point theorem

Let X be a normed vector space, and let K ⊂ X be a non-empty,compact, and convex set. Then given any continuous mappingf : K → K there exists x ∈ K such that f(x) = x.

Banach’s fixed point theorem

If f is a contraction defined on a complete metric space X, thenthere exists a unique x ∈ X such that f(x) = x.

Page 32: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Newton’s method in IR

Theorem

Let f ∈ C1(R,R), and set x̌ = mid(x). We define

Nf (x)def= Nf (x, x̌) = x̌− [DF (x)]−1f(x̌).

If Nf (x) is well-defined, then the following statements hold:

Page 33: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Newton’s method in IR

Theorem

Let f ∈ C1(R,R), and set x̌ = mid(x). We define

Nf (x)def= Nf (x, x̌) = x̌− [DF (x)]−1f(x̌).

If Nf (x) is well-defined, then the following statements hold:

(1) if x contains a zero x∗ of f , then so does Nf (x) ∩ x;

Page 34: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Newton’s method in IR

Theorem

Let f ∈ C1(R,R), and set x̌ = mid(x). We define

Nf (x)def= Nf (x, x̌) = x̌− [DF (x)]−1f(x̌).

If Nf (x) is well-defined, then the following statements hold:

(1) if x contains a zero x∗ of f , then so does Nf (x) ∩ x;

(2) if Nf (x) ∩ x = ∅, then x contains no zeros of f ;

Page 35: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Newton’s method in IR

Theorem

Let f ∈ C1(R,R), and set x̌ = mid(x). We define

Nf (x)def= Nf (x, x̌) = x̌− [DF (x)]−1f(x̌).

If Nf (x) is well-defined, then the following statements hold:

(1) if x contains a zero x∗ of f , then so does Nf (x) ∩ x;

(2) if Nf (x) ∩ x = ∅, then x contains no zeros of f ;

(3) if Nf (x) ⊆ x, then x contains a unique zero of f .

Page 36: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Newton’s method in IR

Theorem

Let f ∈ C1(R,R), and set x̌ = mid(x). We define

Nf (x)def= Nf (x, x̌) = x̌− [DF (x)]−1f(x̌).

If Nf (x) is well-defined, then the following statements hold:

(1) if x contains a zero x∗ of f , then so does Nf (x) ∩ x;

(2) if Nf (x) ∩ x = ∅, then x contains no zeros of f ;

(3) if Nf (x) ⊆ x, then x contains a unique zero of f .

Similar statements hold for the Krawczyk operator

Kf (x)def= x̌− [Df(x̌)]−1f(x̌)−

(1− [Df(x̌)]−1F ′(x)

)[−r, r],

where we use the notation r = rad(x).

Page 37: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Newton’s method in IR

Algorithm

Starting from an initial search region x0, we form the sequence

xi+1 = Nf (xi) ∩ xi i = 0, 1, . . . .

Page 38: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Newton’s method in IR

Algorithm

Starting from an initial search region x0, we form the sequence

xi+1 = Nf (xi) ∩ xi i = 0, 1, . . . .

xixi+1

Nf (xi)

x̌i

Page 39: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Newton’s method in IR

Algorithm

Starting from an initial search region x0, we form the sequence

xi+1 = Nf (xi) ∩ xi i = 0, 1, . . . .

xixi+1

Nf (xi)

x̌i

Performance

If well-defined, this method is never worse than bisection, and itconverges quadratically fast under mild conditions.

Page 40: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Newton’s method in IR

Example

Take f(x) = −2.001 + 3x− x3 and start with x0 = [−3,−3/2].

Page 41: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Newton’s method in IR

Example

Take f(x) = −2.001 + 3x− x3 and start with x0 = [−3,−3/2].

X(0) = [-3.000000000000000,-1.500000000000000]; rad = 7.50000e-01

X(1) = [-2.140015625000001,-1.546099999999996]; rad = 2.96958e-01

X(2) = [-2.140015625000001,-1.961277398284108]; rad = 8.93691e-02

X(3) = [-2.006849239640351,-1.995570580247208]; rad = 5.63933e-03

X(4) = [-2.000120104486270,-2.000103608530276]; rad = 8.24798e-06

X(5) = [-2.000111102890393,-2.000111102873815]; rad = 8.28893e-12

X(6) = [-2.000111102881727,-2.000111102881724]; rad = 1.55431e-15

X(7) = [-2.000111102881727,-2.000111102881724]; rad = 1.55431e-15

Finite convergence!

Unique root in -2.00011110288172 +- 1.555e-15

Page 42: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Newton’s method in IR

Example

Take f(x) = −2.001 + 3x− x3 and start with x0 = [−3,−3/2].

X(0) = [-3.000000000000000,-1.500000000000000]; rad = 7.50000e-01

X(1) = [-2.140015625000001,-1.546099999999996]; rad = 2.96958e-01

X(2) = [-2.140015625000001,-1.961277398284108]; rad = 8.93691e-02

X(3) = [-2.006849239640351,-1.995570580247208]; rad = 5.63933e-03

X(4) = [-2.000120104486270,-2.000103608530276]; rad = 8.24798e-06

X(5) = [-2.000111102890393,-2.000111102873815]; rad = 8.28893e-12

X(6) = [-2.000111102881727,-2.000111102881724]; rad = 1.55431e-15

X(7) = [-2.000111102881727,-2.000111102881724]; rad = 1.55431e-15

Finite convergence!

Unique root in -2.00011110288172 +- 1.555e-15

Stopping condition

Stop when no further improvement takes place.

Page 43: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

The Krawczyk method with bisection

When we have several zeros, we must bisect to isolate the zeros.

Example

Take f(x) = sin (ex + 1) and start with x0 = [0, 3].

Page 44: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

The Krawczyk method with bisection

When we have several zeros, we must bisect to isolate the zeros.

Example

Take f(x) = sin (ex + 1) and start with x0 = [0, 3].

Domain : [0, 3]

Tolerance : 1e-10

Function calls : 71

Unique zero in the interval 0.761549782880[8890,9006]

Unique zero in the interval 1.664529193[6825445,7060436]

Unique zero in the interval 2.131177121086[2673,3558]

Unique zero in the interval 2.4481018026567[773,801]

Unique zero in the interval 2.68838906601606[36,68]

Unique zero in the interval 2.8819786295709[728,1555]

Page 45: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

The Krawczyk method with bisection

When we have several zeros, we must bisect to isolate the zeros.

Example

Take f(x) = sin (ex + 1) and start with x0 = [0, 3].

Domain : [0, 3]

Tolerance : 1e-10

Function calls : 71

Unique zero in the interval 0.761549782880[8890,9006]

Unique zero in the interval 1.664529193[6825445,7060436]

Unique zero in the interval 2.131177121086[2673,3558]

Unique zero in the interval 2.4481018026567[773,801]

Unique zero in the interval 2.68838906601606[36,68]

Unique zero in the interval 2.8819786295709[728,1555]

Applications

Counting short periodic orbits for ODEs [Z. Galias]Measuring the stable regions of the quadratic map [D. Wilczak]

Page 46: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Implicit curves (level sets)

Example

Draw the level-set defined by

f(x, y) = sin (cos x2 + 10 sin y2)− y cos x = 0;

restricted to the domain [−5, 5] × [−5, 5].

Page 47: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Implicit curves (level sets)

Example

Draw the level-set defined by

f(x, y) = sin (cos x2 + 10 sin y2)− y cos x = 0;

restricted to the domain [−5, 5] × [−5, 5].

MATLAB produces the following picture:

−5 0 5−5

0

5

Page 48: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Implicit curves (level sets)

Example

Draw the level-set defined by

f(x, y) = sin (cos x2 + 10 sin y2)− y cos x = 0;

restricted to the domain [−5, 5] × [−5, 5].

MATLAB produces the following picture:

−5 0 5−5

0

5

According to the same m-file, thelevel set defined by |f(x, y)| = 0,however, appears to be empty.

But this is the same set!!!

Page 49: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Implicit curves

The (increasingly tight) set-valued enclosures in both cases are

Page 50: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Implicit curves

The (increasingly tight) set-valued enclosures in both cases are

Page 51: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Quadrature

Example (A bonus problem)

Compute the integral∫ 80 sin

(x+ ex

)dx.

Page 52: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Quadrature

Example (A bonus problem)

Compute the integral∫ 80 sin

(x+ ex

)dx.

A regular MATLAB session:

>> q = quad(’sin(x + exp(x))’, 0, 8)

q =

0.251102722027180

Page 53: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Quadrature

Example (A bonus problem)

Compute the integral∫ 80 sin

(x+ ex

)dx.

A regular MATLAB session:

>> q = quad(’sin(x + exp(x))’, 0, 8)

q =

0.251102722027180

Using an adaptive validated integrator:

$$ ./adQuad 0 8 4 1e-4

Partitions: 8542

CPU time : 0.52 seconds

Integral : 0.347[3863144222905,4140198005782]

Page 54: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Quadrature

Example (A bonus problem)

Compute the integral∫ 80 sin

(x+ ex

)dx.

A regular MATLAB session:

>> q = quad(’sin(x + exp(x))’, 0, 8)

q =

0.251102722027180

Using an adaptive validated integrator:

$$ ./adQuad 0 8 4 1e-4

Partitions: 8542

CPU time : 0.52 seconds

Integral : 0.347[3863144222905,4140198005782]

$$ ./adQuad 0 8 20 1e-10

Partitions: 874

CPU time : 0.45 seconds

Integral : 0.3474001726[492276,652638]

Page 55: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Parameter estimation

Problem formulation

Given a finitely parametrized model function together with some(noisy) data, and a search region P in parameter space:

y = f(x; p)︸ ︷︷ ︸

model

{(xi, yi)}Ni=1︸ ︷︷ ︸

data

p ∈ P︸ ︷︷ ︸

space

try to find parameters that give a good agreement between thedata and the model. [A classic inverse problem]

Page 56: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Parameter estimation

Problem formulation

Given a finitely parametrized model function together with some(noisy) data, and a search region P in parameter space:

y = f(x; p)︸ ︷︷ ︸

model

{(xi, yi)}Ni=1︸ ︷︷ ︸

data

p ∈ P︸ ︷︷ ︸

space

try to find parameters that give a good agreement between thedata and the model. [A classic inverse problem]

Existence: with noisy data, or with an incorrect model, thereis usually no parameter that produces a perfect fit.

Page 57: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Parameter estimation

Problem formulation

Given a finitely parametrized model function together with some(noisy) data, and a search region P in parameter space:

y = f(x; p)︸ ︷︷ ︸

model

{(xi, yi)}Ni=1︸ ︷︷ ︸

data

p ∈ P︸ ︷︷ ︸

space

try to find parameters that give a good agreement between thedata and the model. [A classic inverse problem]

Existence: with noisy data, or with an incorrect model, thereis usually no parameter that produces a perfect fit.

Uniqueness: even with unlimited amounts of exact data,there might not exist a unique solution p♯ ∈ P such that

f(xi; p♯) = yi i = 1, . . . , N.

Page 58: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Parameter estimation

Problem formulation

Given a finitely parametrized model function together with some(noisy) data, and a search region P in parameter space:

y = f(x; p)︸ ︷︷ ︸

model

{(xi, yi)}Ni=1︸ ︷︷ ︸

data

p ∈ P︸ ︷︷ ︸

space

try to find parameters that give a good agreement between thedata and the model. [A classic inverse problem]

Existence: with noisy data, or with an incorrect model, thereis usually no parameter that produces a perfect fit.

Uniqueness: even with unlimited amounts of exact data,there might not exist a unique solution p♯ ∈ P such that

f(xi; p♯) = yi i = 1, . . . , N.

Instability: inverse problems can be extremely ill-conditioned.

Page 59: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Introduction

A statistical approach

Use a (weighted) least-squares approach to find the bestparameter:

argminp∈P

N∑

i=1

wi|f(xi; p)− yi|2.

Page 60: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Introduction

A statistical approach

Use a (weighted) least-squares approach to find the bestparameter:

argminp∈P

N∑

i=1

wi|f(xi; p)− yi|2.

If the parameters enter f linearly, this is “straight-forward”.

Page 61: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Introduction

A statistical approach

Use a (weighted) least-squares approach to find the bestparameter:

argminp∈P

N∑

i=1

wi|f(xi; p)− yi|2.

If the parameters enter f linearly, this is “straight-forward”.

Otherwise, we have moved the problem to global optimization.

Page 62: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Introduction

A statistical approach

Use a (weighted) least-squares approach to find the bestparameter:

argminp∈P

N∑

i=1

wi|f(xi; p)− yi|2.

If the parameters enter f linearly, this is “straight-forward”.

Otherwise, we have moved the problem to global optimization.

The selection of weights is almost always a delicate issue.

Page 63: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Introduction

A statistical approach

Use a (weighted) least-squares approach to find the bestparameter:

argminp∈P

N∑

i=1

wi|f(xi; p)− yi|2.

If the parameters enter f linearly, this is “straight-forward”.

Otherwise, we have moved the problem to global optimization.

The selection of weights is almost always a delicate issue.

A set-valued approach

Locate nearby models that are consistent with nearby data:

f(x; p) −→ f(x;p) (xi, yi) −→ (xi,yi).

Page 64: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Set-valued computations

Points versus sets in parameter space

We move from the point-valued model function f(x; p) to theset-valued version f(x;p).

Page 65: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Set-valued computations

Points versus sets in parameter space

We move from the point-valued model function f(x; p) to theset-valued version f(x;p).

0 5 10 15 20 25 300

0.5

1

1.5

2

2.5

3

0 5 10 15 20 25 300

0.5

1

1.5

2

2.5

3

Figure: (a) p = 0.15, a point in P . (b) p = [0.14, 0.16], a subset of P .The model function is f(x; p) = xe−px, and 10 samples are shown.

Page 66: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Parameter estimation

Strategy

Adaptively bisect the parameter space into sub-boxes: P = ∪Kj=1pj

and examine each pj separately. [Good for parallelisation]

Page 67: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Parameter estimation

Strategy

Adaptively bisect the parameter space into sub-boxes: P = ∪Kj=1pj

and examine each pj separately. [Good for parallelisation]

Each sub-box p of the parameter space falls into one of threecategories:

Page 68: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Parameter estimation

Strategy

Adaptively bisect the parameter space into sub-boxes: P = ∪Kj=1pj

and examine each pj separately. [Good for parallelisation]

Each sub-box p of the parameter space falls into one of threecategories:

(1) consistent

if f(xi;p) ⊂ yi for all i = 0, . . . , N . SAVE

Page 69: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Parameter estimation

Strategy

Adaptively bisect the parameter space into sub-boxes: P = ∪Kj=1pj

and examine each pj separately. [Good for parallelisation]

Each sub-box p of the parameter space falls into one of threecategories:

(1) consistent

if f(xi;p) ⊂ yi for all i = 0, . . . , N . SAVE

(2) inconsistent

if f(xi;p) ∩ yi = ∅ for at least one i. DROP

Page 70: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Parameter estimation

Strategy

Adaptively bisect the parameter space into sub-boxes: P = ∪Kj=1pj

and examine each pj separately. [Good for parallelisation]

Each sub-box p of the parameter space falls into one of threecategories:

(1) consistent

if f(xi;p) ⊂ yi for all i = 0, . . . , N . SAVE

(2) inconsistent

if f(xi;p) ∩ yi = ∅ for at least one i. DROP

(3) undetermined

not (1), but f(xi;p) ∩ yi 6= ∅ for all i = 0, . . . , N . SPLIT

Page 71: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Parameter estimation

Example

Consider the model function

f(x; p1, p2) = 5e−p1x − 4× 10−6e−p2x

with samples taken at x = 0, 5 . . . , 40 using p♯ = (0.11,−0.32).Accepting a relative noise level of 90%, we get the following set ofconsistent parameters:

Page 72: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Parameter estimation

Example

Consider the model function

f(x; p1, p2) = 5e−p1x − 4× 10−6e−p2x

with samples taken at x = 0, 5 . . . , 40 using p♯ = (0.11,−0.32).Accepting a relative noise level of 90%, we get the following set ofconsistent parameters:

Page 73: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Parameter estimation

Varying the relative noise levels between 10, 20 . . . , 90%, we getthe following indeterminate sets.

Page 74: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Constraint propagation

Constraining the parameter/data space

We use set-valued constraint propagation to quickly discardinconsistent regions in the data and the parameter space.

This is done without bisection!

Page 75: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Constraint propagation

Constraining the parameter/data space

We use set-valued constraint propagation to quickly discardinconsistent regions in the data and the parameter space.

This is done without bisection!

Example

Let f(x; p) = xe−px, and consider the situation p = [0, 1] and(x,y) = (2, [1, 3]).

Page 76: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Constraint propagation

Constraining the parameter/data space

We use set-valued constraint propagation to quickly discardinconsistent regions in the data and the parameter space.

This is done without bisection!

Example

Let f(x; p) = xe−px, and consider the situation p = [0, 1] and(x,y) = (2, [1, 3]). By a forward (interval) evaluation, we have

f(2; [0, 1]) = 2e−2[0,1] = 2e[−2,0] = 2[e−2, 1] = [2e−2, 2].

Page 77: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Constraint propagation

Constraining the parameter/data space

We use set-valued constraint propagation to quickly discardinconsistent regions in the data and the parameter space.

This is done without bisection!

Example

Let f(x; p) = xe−px, and consider the situation p = [0, 1] and(x,y) = (2, [1, 3]). By a forward (interval) evaluation, we have

f(2; [0, 1]) = 2e−2[0,1] = 2e[−2,0] = 2[e−2, 1] = [2e−2, 2].

This allows us to contract the data range according to

y 7→ y ∩ f(x;p) = [1, 3] ∩ [2e−2, 2] = [1, 2].

Page 78: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Constraint propagation

Directed Acyclic Graphs (DAGs)

We use a DAG representation of the model function to automateconstraint propagations.

Page 79: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Constraint propagation

Directed Acyclic Graphs (DAGs)

We use a DAG representation of the model function to automateconstraint propagations.

x

p

×

× neg exp

n1

n2

n3 n4 n5

n6 = y

Page 80: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Constraint propagation

Directed Acyclic Graphs (DAGs)

We use a DAG representation of the model function to automateconstraint propagations.

x

p

×

× neg exp

n1

n2

n3 n4 n5

n6 = y

n1 = x

n2 = p

n3 = n1 × n2

n4 = −n3

n5 = en4

n6 = n1 × n5.

Figure: The DAG representation of a forward sweep of y = xe−px,together with the corresponding code list.

Page 81: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Constraint propagation

Directed Acyclic Graphs (DAGs)

We can propagate constraints from data to the parameter bymoving backwards in the code list.

Page 82: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Constraint propagation

Directed Acyclic Graphs (DAGs)

We can propagate constraints from data to the parameter bymoving backwards in the code list.

x

y

÷

÷neg log

n1p = n2

n3 n4 n5

n6

Page 83: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Constraint propagation

Directed Acyclic Graphs (DAGs)

We can propagate constraints from data to the parameter bymoving backwards in the code list.

x

y

÷

÷neg log

n1p = n2

n3 n4 n5

n6

n5 = n6 ÷ n1

n4 = log n5

n3 = −n4

n2 = n3 ÷ n1.

Figure: The DAG representation of a backward sweep ofy = xe−px, together with the corresponding code list.

Page 84: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Constraint propagation

Example

Again, we work on the model function y = f(x; p) = xe−px, butnow with the data (x,y) = (2, [1, 3]), together with the parameterdomain p = [0, 1].

Page 85: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Constraint propagation

Example

Again, we work on the model function y = f(x; p) = xe−px, butnow with the data (x,y) = (2, [1, 3]), together with the parameterdomain p = [0, 1]. The forward sweep, performed in Example 7,contracts the interval data to y = [1, 2].

Page 86: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Constraint propagation

Example

Again, we work on the model function y = f(x; p) = xe−px, butnow with the data (x,y) = (2, [1, 3]), together with the parameterdomain p = [0, 1]. The forward sweep, performed in Example 7,contracts the interval data to y = [1, 2]. Performing a backwardsweep contracts the interval parameter to p = [0, 12 log 2]:

n5 = n6 ÷ n1 = [1, 2] ÷ 2 = [12 , 1]n4 = log n5 = log [12 , 1] = [− log 2, 0]n3 = −n4 = [0, log 2]n2 = n3 ÷ n1 = [0, log 2]÷ 2 ≈ [0, 0.34657359].

Page 87: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Constraint propagation

Example

Again, we work on the model function y = f(x; p) = xe−px, butnow with the data (x,y) = (2, [1, 3]), together with the parameterdomain p = [0, 1]. The forward sweep, performed in Example 7,contracts the interval data to y = [1, 2]. Performing a backwardsweep contracts the interval parameter to p = [0, 12 log 2]:

n5 = n6 ÷ n1 = [1, 2] ÷ 2 = [12 , 1]n4 = log n5 = log [12 , 1] = [− log 2, 0]n3 = −n4 = [0, log 2]n2 = n3 ÷ n1 = [0, log 2]÷ 2 ≈ [0, 0.34657359].

Note that, in one forward/backward sweep, we managed to excludeover 65% of the parameter domain, at the same time reducing thedata uncertainty by 50%.

Page 88: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Mixed-effects models

Mixed-effects models

We are given several data sets (trajectories) corresponding to kdifferent “individuals”:

individual1 : (x11, y11), (x12, y12), . . . , (x1N , y1N1)

individual2 : (x21, y21), (x22, y22), . . . , (x2N , y2N2)

......

...

individualk : (xk1, yk1), (xk2, yk2), . . . , (xkN , ykNk).

Some model parameters are equal (shared) for all individuals, andsome are distinct.

Page 89: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Mixed-effects models

Mixed-effects models

We are given several data sets (trajectories) corresponding to kdifferent “individuals”:

individual1 : (x11, y11), (x12, y12), . . . , (x1N , y1N1)

individual2 : (x21, y21), (x22, y22), . . . , (x2N , y2N2)

......

...

individualk : (xk1, yk1), (xk2, yk2), . . . , (xkN , ykNk).

Some model parameters are equal (shared) for all individuals, andsome are distinct.

We need to consider all individuals simultaneously. Otherwisethe number of unknown parameters may be too large.

Page 90: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

A mixed-effects model for orange tree truncs

Example

We will apply our method to the following scenario:

Page 91: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

A mixed-effects model for orange tree truncs

Example

We will apply our method to the following scenario:

Model function: f(x; p) =p1

1 + p2ep3x

Page 92: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

A mixed-effects model for orange tree truncs

Example

We will apply our method to the following scenario:

Model function: f(x; p) =p1

1 + p2ep3x

Individual parameter: pi1 = p♯1 + ηi, ηi ∼ N(0, σ2)

Page 93: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

A mixed-effects model for orange tree truncs

Example

We will apply our method to the following scenario:

Model function: f(x; p) =p1

1 + p2ep3x

Individual parameter: pi1 = p♯1 + ηi, ηi ∼ N(0, σ2)

Data perturbation: yij = y♯ij(1 + θij), θij ∼ U(−ǫ,+ǫ)

Page 94: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

A mixed-effects model for orange tree truncs

Example

We will apply our method to the following scenario:

Model function: f(x; p) =p1

1 + p2ep3x

Individual parameter: pi1 = p♯1 + ηi, ηi ∼ N(0, σ2)

Data perturbation: yij = y♯ij(1 + θij), θij ∼ U(−ǫ,+ǫ)

For this specific example, we will use Np ∈ {1, 2, 5, 50} subjects,sampled at Nd = 10 data sites, evenly spaced within [100, 1600].

Page 95: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

A mixed-effects model for orange tree truncs

Example

We will apply our method to the following scenario:

Model function: f(x; p) =p1

1 + p2ep3x

Individual parameter: pi1 = p♯1 + ηi, ηi ∼ N(0, σ2)

Data perturbation: yij = y♯ij(1 + θij), θij ∼ U(−ǫ,+ǫ)

For this specific example, we will use Np ∈ {1, 2, 5, 50} subjects,sampled at Nd = 10 data sites, evenly spaced within [100, 1600].

Target parameters:p♯ = (191.84, 8.153,−0.0029), σ = 20, ǫ ∈ {0.01, 0.1, 0.2, 0.5}.

Page 96: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

A mixed-effects model for orange tree truncs

Example

We will apply our method to the following scenario:

Model function: f(x; p) =p1

1 + p2ep3x

Individual parameter: pi1 = p♯1 + ηi, ηi ∼ N(0, σ2)

Data perturbation: yij = y♯ij(1 + θij), θij ∼ U(−ǫ,+ǫ)

For this specific example, we will use Np ∈ {1, 2, 5, 50} subjects,sampled at Nd = 10 data sites, evenly spaced within [100, 1600].

Target parameters:p♯ = (191.84, 8.153,−0.0029), σ = 20, ǫ ∈ {0.01, 0.1, 0.2, 0.5}.

Search region:P = ([0, 300], [0, 9], [−1, 0]).

Page 97: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

A mixed-effects model for orange tree truncs

0 200 400 600 800 1000 1200 1400 16000

50

100

150

200

250

Figure: Data inflation and contraction for the example. The graph of themodel function for one subject (blue line). The data points are markedwith red dots. The inflated data sets are shown as striped bars, and there-contracted data as green bars.

Page 98: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

A mixed-effects model for orange tree truncs

Numerical results

Np = 1 Np = 2

ǫ = 0.01 190.639 (– –) (0.010) 193.141 (19.6) (0.013)ǫ = 0.1 194.139 (– –) (0.092) 195.233 (21.1) (0.097)ǫ = 0.2 189.139 (– –) (0.190) 193.437 (20.3) (0.192)ǫ = 0.5 167.226 (– –) (0.604) 167.770 (26.6) (0.589)

Np = 5 Np = 50

ǫ = 0.01 191.675 (20.1) (0.014) 191.239 (20.1) (0.012)ǫ = 0.1 192.954 (21.4) (0.099) 198.428 (22.2) (0.110)ǫ = 0.2 191.773 (20.3) (0.203) 197.580 (23.6) (0.214)ǫ = 0.5 164.656 (23.9) (0.620) 174.318 (27.1) (0.618)

Table: The results of four experiments for the example, each using100 trial runs with p1 = 191.184, and σ = 20.0. For each pair(ǫ,Np), we display the triple µ(p1), µ(σ), and µ(ǫ) – the averageestimates of the distribution parameters for p1, and the data error.

Page 99: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

A mixed-effects model for orange tree truncs

202204

206208

210212

8.1

8.15

8.2

−2.98

−2.97

−2.96

−2.95

−2.94

x 10−3

p1p2

p3

Figure: The set of consistent parameters for two subjects from theexample.

Page 100: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Conclusions

Page 101: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Conclusions

Standard numerics does not produce mathematics.

Page 102: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Conclusions

Standard numerics does not produce mathematics.

Set-valued mathematics enables validated numerics.

Page 103: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Conclusions

Standard numerics does not produce mathematics.

Set-valued mathematics enables validated numerics.

Existence (uniqueness) comes from fixed point theorems.

Page 104: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Conclusions

Standard numerics does not produce mathematics.

Set-valued mathematics enables validated numerics.

Existence (uniqueness) comes from fixed point theorems.

Set-valued methods are suitable for inverse problems.

Page 105: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Conclusions

Standard numerics does not produce mathematics.

Set-valued mathematics enables validated numerics.

Existence (uniqueness) comes from fixed point theorems.

Set-valued methods are suitable for inverse problems.

Parameter estimation is done via relaxation.

Page 106: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Conclusions

Standard numerics does not produce mathematics.

Set-valued mathematics enables validated numerics.

Existence (uniqueness) comes from fixed point theorems.

Set-valued methods are suitable for inverse problems.

Parameter estimation is done via relaxation.

The relaxed problem is solved via set inversion.

Page 107: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Further study...

Interval Computations Web Page

http://www.cs.utep.edu/interval-comp

Page 108: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Further study...

Interval Computations Web Page

http://www.cs.utep.edu/interval-comp

INTLAB – INTerval LABoratory

http://www.ti3.tu-harburg.de/~rump/intlab/

Page 109: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Further study...

Interval Computations Web Page

http://www.cs.utep.edu/interval-comp

INTLAB – INTerval LABoratory

http://www.ti3.tu-harburg.de/~rump/intlab/

CXSC – C eXtensions for Scientific Computation

http://www.xsc.de/

Page 110: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

Further study...

Interval Computations Web Page

http://www.cs.utep.edu/interval-comp

INTLAB – INTerval LABoratory

http://www.ti3.tu-harburg.de/~rump/intlab/

CXSC – C eXtensions for Scientific Computation

http://www.xsc.de/

CAPA – Computer–Aided Proofs in Analysis

http://www.math.uu.se/~warwick/CAPA/

Page 111: Validated Numerics a short introduction to rigorous …Validated Numerics a short introduction to rigorous computations Warwick Tucker TheCAPAgroup Department ofMathematics UppsalaUniversity,Sweden

A short message from your sponsors...

Validated Numerics:

A Short Introduction to Rigorous

Computations

Warwick Tucker

Princeton University Press, 2011

ISBN: 9780691147819

152 pp.|6 x 9|41 illus.|12 tables.

USD 45.00/GBP 30.95

http://press.princeton.edu/titles/9488.html