Try   HackMD

最小平方逼近多項式(Polynomials of Least square)

目的

我們想要用一個多項式來逼近另一個 function

fC[a,b],這個多項式我們寫成

Pn(x)=a0+a1x1+ ... +akxk=Σk=0nakxk

這樣的話 least square error,或一開始的 LDA 的 error 就會長

f(x)Pn(x),那一樣,我們要找到
a0,a1, ... ,an
來最小化
E

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

推導

而我們要最小化這個

E 就要用到 gradient 了,也就是說
E(a0, ... ,an)=0
,或妳也可以說
Eaj=0, j=0,1, ... ,n

那我們就可以開始推了:

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

因為 A 是個 ill-condition 且稠密的矩陣,如果要解這個線性系統會很麻煩,非常沒有效率,因此我們就要換個建構多項式的方法,其中一種方法就是利用線性獨立來操作

在操作之前要先複習一個概念:一個多項式的集合

{ϕ0,ϕ1, ... ,ϕn} 線性獨立 iff
c0ϕ0(x)+c1ϕ1(x)+ ... +cnϕn(x)=0(c0=c1= ... =cn=0)

那我們假設

ϕj 是一個 degree 為 j 的多項式,那麼
{ϕ0,ϕ1, ... ,ϕn}
在任何區間
[a,b]
上都會線性獨立,因為他們 degree 不同,像是
x2
x
就線性獨立

所以現在

Pn(x)=Σk=0nakϕk(x),那一樣我們要找
a0
a1...
等係數來最小化
E

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

然後一樣找 gradient E = 0:

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

例子

Example 1. 勒壤得多項式 Legendre Function

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

那個

L0
L1
是我們取的
ϕ

Example 2. 柴比雪夫多項式 Chebyshev polynomials

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

那個

T0
T1
是我們取的
ϕ