Lecture 5 I Function Approximation Data driven function

  • Slides: 21
Download presentation
Lecture 5 I Function Approximation ØData driven function approximation ØProjective hyper-tangent function 數值方法 1

Lecture 5 I Function Approximation ØData driven function approximation ØProjective hyper-tangent function 數值方法 1

Interpolation vs approximation ► Polynomial interpolation § Constraints: f(xi)=yi for all I ► Polynomial

Interpolation vs approximation ► Polynomial interpolation § Constraints: f(xi)=yi for all I ► Polynomial approximation § Minimization of mean square error ► Non-polynomial approximation § Minimization of mean square error 數值方法 2

Data Driven Function Approximation ► Input § Paired data ► Output § An approximating

Data Driven Function Approximation ► Input § Paired data ► Output § An approximating function ► Requirement § Minimization of mean square error 數值方法 3

Approximating function f: a mapping realized by weight sum of hyper-tangent functions 數值方法 4

Approximating function f: a mapping realized by weight sum of hyper-tangent functions 數值方法 4

Why weight sum of hyper-tangent functions ? ► With only linear combination, the approximating

Why weight sum of hyper-tangent functions ? ► With only linear combination, the approximating function is linear 數值方法 5

Install NNSYSID 1. Install 2. Download The NNSYSID Toolbox learn_MLP By Levenberg Marquardt method

Install NNSYSID 1. Install 2. Download The NNSYSID Toolbox learn_MLP By Levenberg Marquardt method 3. Set path to recruit the directory where NNSYSID. zip is extracted 數值方法 6

Example fa 1 d. m x tanh(x+2)+sech(x) Black box y observation Create paired data

Example fa 1 d. m x tanh(x+2)+sech(x) Black box y observation Create paired data DDFA One tanh 數值方法 7

Single tanh x h=ax+b tanh(h) r Approximate tanh(x+2)+sech(x) by single tanh 數值方法 8

Single tanh x h=ax+b tanh(h) r Approximate tanh(x+2)+sech(x) by single tanh 數值方法 8

Example fa 1 d. m x tanh(x+2)+sech(x) Black box y observation Create paired data

Example fa 1 d. m x tanh(x+2)+sech(x) Black box y observation Create paired data DDFA two tanh functions 數值方法 9

Two weighted tanh functions 1 x b 1 tanh b 2 a 1 r

Two weighted tanh functions 1 x b 1 tanh b 2 a 1 r 2 a 2 tanh 數值方法 10

Approximate tanh(x+2)+sech(x) by two tanh functions 數值方法 11

Approximate tanh(x+2)+sech(x) by two tanh functions 數值方法 11

Multi-Layer Perceptrons (tanhs) 1 x INPUT LAYER b 1 tanh b 2 a 1

Multi-Layer Perceptrons (tanhs) 1 x INPUT LAYER b 1 tanh b 2 a 1 r 2 a 2 tanh HIDDEN LAYER 數值方法 OUTPUT LAYER 12

Example fa 1 d. m x sin(x)+sech(x) Black box y observation Create paired data

Example fa 1 d. m x sin(x)+sech(x) Black box y observation Create paired data DDFA two tanh functions 數值方法 13

Approximate sin(x)+sech(x) by five tanh functions 數值方法 14

Approximate sin(x)+sech(x) by five tanh functions 數值方法 14

MLP Network 1 x b 1 tanh b 2 a 1 tanh a 2

MLP Network 1 x b 1 tanh b 2 a 1 tanh a 2 b. M ……. a. M tanh r 1 r 2 r. M+1 1 數值方法 15

Data structure ► a=[a 1 a 2 a 3 … a M] ► b=[b

Data structure ► a=[a 1 a 2 a 3 … a M] ► b=[b 1 b 2 b 3 … b. M] ► r=[r 1 r 2 r 3 … r. M+1] 數值方法 16

MLP evaluation ► Given x, a, b and r, find 數值方法 17

MLP evaluation ► Given x, a, b and r, find 數值方法 17

Procedure: MLP evaluation 1. 2. 3. 4. Input r, a, b and x, M

Procedure: MLP evaluation 1. 2. 3. 4. Input r, a, b and x, M y=r(M+1) Set M to the length of a For m=1: M a. Add r(i)*tanh(x*a(i)+b(i)) to y 5. Return y 數值方法 18

y=eval_MLP(x, r, a, b, M); M=length(a) y=r(M+1) exit for m=1: M Add r(i)*tanh(x*a(i)+b(i)) to

y=eval_MLP(x, r, a, b, M); M=length(a) y=r(M+1) exit for m=1: M Add r(i)*tanh(x*a(i)+b(i)) to y 數值方法 19

Function approximation Given Find a parametric function that minimize 數值方法 20

Function approximation Given Find a parametric function that minimize 數值方法 20

Problem statement Given Minimize 數值方法 21

Problem statement Given Minimize 數值方法 21