Anda di halaman 1dari 33

5.

Permasalahan Least Square

YUITA ARUM SARI


yuita@ub.ac.id

Disusun oleh Tim Ajar Mata Kuliah Metode Numerik 2016/2017

OUTLINE BAB 5

Persamaan Least Square


Transformasi Orthogonal
Transformasi QR
Transformasi Householder
Transformasi Gram-Schmid

Systems of Linear Equations

Problem to solve: M x = b
Given M x = b :
Is there a solution?
Is the solution unique?

Systems of linear equations

r
M1

L
r
M2 L
L

x1 b1

r x2
b2
MN =
M M

xN bN

r
r
r
x1M 1 + x2 M 2 + L + x N M N = b
Find a set of weights x so that the weighted sum of the
columns of the matrix M is equal to the right hand side b

Systems of linear equations - Existence


A solution exists if:
There exist weights, x1, ., xN, such that:

x1 M 1 + x2 M 2 + ... + xN M N = b

A solution exists when b is in the span of the columns of M

Systems of linear equations


1
1
1
.
1

! = # + %&
1. # + &. %= y
!)
&)
!*
&*
&+ # = !+
%
.
.
!,
&,

Matriks A

Ax = b

Solving the least-squares problem


We need to solve an over-determined system:

Ax = b

We find the solution by solving the normal equations:

AT Ax = AT b

x = ( AT A)-1 AT b

Very efficient solution by Cholesky factorization of ATA:

AT A = RT R
R is upper-triangular and sparse
Once R is computed, solving for x, y, z by back-substitution:

RT = AT b
Rx =

Solving the least-squares problem


Contoh :
Diberikan titik-titik sebagai berikut (1,3), (2,4), (5,5), dan (6,6).
Dengan menggunakan persamaan least square, carilah nilai x!

Basis Orthoghonal dan


Orthonormal
Suatu himpunan vektor dalam ruang hasil kali dalam disebut
himpunan ortogonal jika semua pasangan vektor-vektor yang
berbeda dalam himpunan tersebut orthogonal.
Suatu himpunan ortogonal dimana setiap vektor mempunyai
norma 1 disebut orthonormal.
Dua vektor u dan v dalam suatu hasil kali dalam disebut
orthogonal jika <u, v> = 0.
Himpunan W = { v1 , v2 , , vn } adalah ortonormal jika:
0, jika i j
vi,vj = <vi, vj> =
1, jika i = j

Basis Orthoghonal dan


Orthonormal

Matriks Orthogonal
Himpunan ortogonal dalam Rn Matriks diagonal.
Kolom-kolom matriks Qmxn membentuk himpunan yang
ortonormal jika dan hanya jika QTQ = In .
Matriks Anxn yang kolom-kolomnya membentuk himpunan
yang ortonormal disebut matriks ortogonal.
Matriks Anxn adalah matriks ortogonal jika dan hanya jika
Q-1=QT (atau dengan kata lain QTQ=QQT=In )

Q-1=QT

QTQ=QQT=In

Normalisasi Vektor Tak Nol

Contoh Normalisasi Vektor Tak Nol

Latihan
Periksa apakah himpunan-himpunan berikut merupakan
himpunan ortogonal, jika ya, periksa juga apakah himpunanhimpunan berikut merupakan himpunan ortonormal?

Proyeksi Orthogonal

Proyeksi Orthogonal

Basis Orthonormal

Contoh

Proses Gram Schmidt


Proses mengubah suatu basis sebarang menjadi suatu basis
ortonormal disebut Proses Gram-Schmidt

Proses Gram Schmidt

Proses Gram Schmidt

Contoh Proses Gram Schmidt

Contoh Proses Gram Schmidt

Transformasi QR

Dekomposisi QR

Contoh Dekomposisi QR

Contoh Dekomposisi QR

Transformasi Householder

Transformasi householder merupakan


salah satu metode yang biasa digunakan
didalam dekomposisi QR
Nama householder berasal dari nama
penemunya yaitu Alston Scott
Householder

Transformasi Householder

Householder transformation has form


vvT
H = I -2 T
v v

for nonzero vector v


H is orthogonal and symmetric: H = H T = H -1
Given vector a, we want to choose v so that
a
1
0
0
Ha = = a = a e1
M
M


0
0

Transformasi Householder

Substituting into formula for H, we can take

v = a - a e1

a = || a ||2 , with sign chosen to avoid


And
cancellation, i.e.

a = -sign(a1 ) || a ||2

Transformasi Householder
a = [ 2 1 2]
If , then we take
T

2
1 2 a
v = a - a e1 = 1 - a 0 = 1 - 0
2
0 2 0

where a = || a ||2 = 3
Since a1 is positive, we choose negative sign for a
to avoid cancellation, so
2 -3 5

v = 1 - 0 = 1
2 0 2

Contoh Transformasi Householder


To confirm that transformation works,

Terima kasih.
Metode Numerik

Anda mungkin juga menyukai