Professional Documents
Culture Documents
Part 9 - Model Validation and Structure Selection
Part 9 - Model Validation and Structure Selection
Model validation
Structure selection
Part IX
Model validation and structure selection
Overparametrization
Model validation
Structure selection
Overparametrization
Model validation
Structure selection
Overparametrization
Motivation
So far, we validated and selected models mostly in a heuristic way, by
examining plots using common sense.
Model validation
Structure selection
Overparametrization
Model validation
Structure selection
Table of contents
Structure selection
Overparametrization
Model validation
Structure selection
Overparametrization
Whiteness: Intuition
Model validation
Structure selection
Overparametrization
Model validation
Structure selection
Overparametrization
Independence hypothesis 2
(I2) The prediction errors (k + ) are independent of u(k ) for any
(i.e., of all inputs).
Model validation
Structure selection
Overparametrization
All hypotheses
Model validation
Structure selection
Overparametrization
Whiteness: Correlations
Model validation
Structure selection
N
1 X
(k + )(k)
N
k=1
b
r ( )
b
r (0)
Overparametrization
Model validation
Structure selection
Overparametrization
Whiteness test at
For any Gaussian distribution N (, 2 ), the probability of drawing a
sample in the interval 1.96, + 1.96 is found (from the
Gaussian formula) to be 0.95.
Model validation
Structure selection
Overparametrization
Whiteness test at
, then the whiteness hypothesis r ( ) = 0 is accepted.
If |x( )| 1.96
N
Otherwise, the whiteness hypothesis is rejected.
Model validation
Structure selection
Overparametrization
Independence: Correlations
To verify independence of from u, use cross-correlation function:
ru ( ) = E {(k + )u(k)}
1
2
if 0
if < 0
Model validation
Structure selection
Overparametrization
Independence test at
Like before, for large N, x( ) is distributed according to Gaussian
N (0, N1 ), and therefore:
1.96
P(|x( )| ) = 0.95
N
Independence test at
, then the independence hypothesis ru ( ) = 0 is
If |x( )| 1.96
N
accepted.
Otherwise, the independence hypothesis is rejected.
Model validation
Structure selection
Table of contents
Structure selection
Overparametrization
Model validation
Structure selection
B(q 1 )
u(k) + e(k )
F (q 1 )
Overparametrization
Model validation
Structure selection
Overparametrization
The model fails the whiteness test (W). This is because the system is
not within the model class, leading to an inaccurate model. The
model is rejected.
Model validation
Structure selection
Overparametrization
Simulating on the validation data confirms the fact that the model is
poor.
Model validation
Structure selection
Overparametrization
Matlab: OE model
mOE = oe(id, [3, 3, 1]); resid(mOE, id);
Model validation
Structure selection
Overparametrization
Simulating the model on the validation data confirms the model has
good quality.
Model validation
Structure selection
Table of contents
Structure selection
Overparametrization
Model validation
Structure selection
Overparametrization
Chi-squared distribution
Let x be a vector of m random variables xi so that each xi is has
Gaussian distribution N (0, 1).
Pm
Define 2 (m) as the distribution of the sum i=1 xi2 = x > x. This is
called the Chi-squared distribution (Matlab: chi2pdf).
Model validation
Structure selection
Overparametrization
Whiteness test
>
Define r = [b
r (1), . . . , b
r (m)] , and choose a small , e.g. 0.05.
1.96
)
N
Whiteness test
>
r
If N brr2 (0)
(), then the hypothesis that the sequence (k) is white
noise is accepted.
Otherwise, the hypothesis is rejected.
(Compare: |x( )|
1.96
)
N
Model validation
Structure selection
Overparametrization
Independence test
Model validation
Structure selection
Table of contents
Structure selection
Overparametrization
Model validation
Structure selection
Overparametrization
N
1 X
(k)2
N
k=1
This does not take into account the complexity of the model, so it may
lead to overfitting. We explore other options (without going into their
derivation).
Model validation
Structure selection
Overparametrization
2p
N
Model validation
Structure selection
b 1 + p/N
WFPE = V ()
1 p/N
Choice: Model with smallest WFPE .
Intuition: When N is large:
b
V ()
The term
2p
N
1 + p/N
b + 2p/N ) V ()(1
b + 2p )
= V ()(1
1 p/N
1 p/N
N
Overparametrization
Model validation
Structure selection
Overparametrization
F-test
Take just two model classes M1 , M2 so that M1 M2 (e.g., they
are both ARX models and M2 has larger na and nb).
Choice: M1 is chosen over M2 (M2 does not offer a significant
improvement) if:
V1 (b1 ) V2 (b2 )
()
N
V2 (b2 )
() is defined like before using the Chi-squared distribution, as the
value so that a random variable z 0 distributed with 2 (p2 p1 )
has probability 1 of being at most :
P(z ) = 1
Subscripts 1 and 2 refer to the respective model classes. E.g. p2 is
the number of parameters of M2 , and is larger than p1 .
Model validation
Matlab example
An OE system with n = 2.
Structure selection
Overparametrization
Model validation
Structure selection
Overparametrization
Recall arxstruc:
Na = 1:15; Nb = 1:15; Nk = 1:5;
NN = struc(Na, Nb, Nk); V = arxstruc(id, val, NN);
struc generates all combinations of orders in Na, Nb, Nk.
arxstruc identifies for each combination an ARX model on the
data id, simulates it on the data val, and returns information
about the MSEs, model orders etc. in V.
Model validation
Structure selection
Overparametrization
Model validation
Matlab: Results
Structure selection
Overparametrization
Model validation
Structure selection
Overparametrization
Remarks
AIC, FPE also work if the system is not in the model class.
Matlab offers functions aic, fpe that compute these criteria for a
list of models.
Model validation
Structure selection
Table of contents
Structure selection
Overparametrization
Model validation
Structure selection
Overparametrization
Motivation
Consider the real system obeys the ARMAX structure:
A0 (q 1 )y (k ) = B0 (q 1 )u(k ) + C0 (q 1 )e(k )
where subscript 0 indicates quantities related to the real system.
This is equivalent to the model:
M(q 1 )A0 (q 1 )y(k) = M(q 1 )B0 (q 1 )u(k) + M(q 1 )C0 (q 1 )e(k)
with M(q 1 ) some polynomial of order nm.
So, using ARMAX identification with na = na0 + nm, nb = nb0 + nm,
nc = nc0 + nm will produce an accurate model. This model is
however too complicated (overparametrized), and will have some
(nearly) common factors M(q 1 ) in all polynomials.
Model validation
Structure selection
Overparametrization
Pole-zero cancellations
Model validation
Structure selection
Overparametrization
Model validation
Structure selection
Overparametrization