MatLab Lecture 16 Orthogonal Functions Lecture 01 Using MatLab Lecture 02 Looking At Data Lecture 03 Probability and Measurement Error Lecture 04 Multivariate Distributions ID: 783490
Download The PPT/PDF document "Environmental Data Analysis with" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Environmental Data Analysis with MatLab
Lecture 16:
Orthogonal Functions
Slide2Lecture 01
Using
MatLabLecture 02 Looking At DataLecture 03 Probability and Measurement Error Lecture 04 Multivariate DistributionsLecture 05 Linear ModelsLecture 06 The Principle of Least SquaresLecture 07 Prior InformationLecture 08 Solving Generalized Least Squares ProblemsLecture 09 Fourier SeriesLecture 10 Complex Fourier SeriesLecture 11 Lessons Learned from the Fourier Transform Lecture 12 Power Spectral DensityLecture 13 Filter Theory Lecture 14 Applications of Filters Lecture 15 Factor Analysis Lecture 16 Orthogonal functions Lecture 17 Covariance and AutocorrelationLecture 18 Cross-correlationLecture 19 Smoothing, Correlation and SpectraLecture 20 Coherence; Tapering and Spectral Analysis Lecture 21 InterpolationLecture 22 Hypothesis testing Lecture 23 Hypothesis Testing continued; F-TestsLecture 24 Confidence Limits of Spectra, Bootstraps
SYLLABUS
Slide3purpose of the lecture
further develop Factor Analysis
and introduceEmpirical Orthogonal Functions
Slide4review of the last lecture
Slide5example
Atlantic Rock Dataset
chemical composition for several thousand rocks
Slide6Rocks are a mix of minerals, and …
mineral
1
mineral
2
mineral
3
rock 1
rock 2
rock 3
rock 4
rock 5
rock 6
rock 7
…minerals have a well-defined
composition
Slide7rocks contain elements
rocks contain minerals
andminerals contain elementssimpler
Slide8rocks contain elements
rocks contain minerals
andminerals contain elementssimplersamplessamplesfactorsfactors
Slide9Slide10the sample matrix,
S
N samples by M elementse.g.sediment samplesrock samplesword element is used in the abstract sense and may not refer to actual chemical elements
Slide11the factor matrix, F
P
factors by M elementse.g.sediment sourcesmineralsnote that there are P factorsa simplification if P<M
Slide12the loading matrix, C
N
samples by P factorsspecifies the mix of factors for each sample
Slide13the key question
how many factors are
needed to represent the samples?and what are these factors?
Slide14singular value decomposition
the methodology for
answer these questions
Slide15the matrix of
P mutually-perpendicular vectors, each of length M
diagonal matrix Σ,of P singular valuesthe matrix of P mutually-perpendicular vectors, each of length N
sample matrix
Slide16the matrix of loadings,
C
. the matrix of factors, Fsince C depends on Σ,the samples contains more of the factors with large singular values than of the factors with the small singular values
Slide17in MatLab
Slide18singular values,
S
iiindex, iplot of M singular values, sorted by size
Slide19singular values,
S
iiindex, idiscard, since close to zerouse it to discard near-zero singular values
Slide20singular values,
S
iiindex, iand to determine the number P of factorsP=5
Slide21graphical representation of factors 2 through 5
f
5f2f3f4SiO2TiO2Al2O3FeOtotalMgOCaONa2OK2OAtlantic Rock Dataset
Slide22C
2
C3C4factor loadings C2 through C4 plotted in 3Dfactors 2 through 4 capture most of the variability of the rocks
Slide23end of review
Slide24Part 1: Creating Spiky Factors
Slide25can we find “better” factors
that those returned by
svd()?
Slide26mathematically
S
= CF = C’ F’with F’ = M F and C’ = M-1 Cwhere M is any P×P matrix with an inversemust rely on prior information to choose M
Slide27one possible type of prior information
factors should contain mainly just a few elements
Slide28example of minerals
Mineral
CompositionQuartzSiO2RutileTiO2AnorthiteCaAl2Si2O8FosteriteMg2SiO4
Slide29spiky factors
factors containing mostly just a few elements
Slide30How to quantify spikiness?
Slide31variance as a measure of spikiness
Slide32modification for factor analysis
Slide33modification for factor analysis
depends on the square, so positive and negative values are treated the same
Slide34f(1)= [1, 0, 1, 0, 1, 0]
T
is much spikier than f(2)= [1, 1, 1, 1, 1, 1]T
Slide35f(2)=[1, 1, 1, 1, 1, 1]
T
is just as spiky as f(3)= [1, -1, 1, -1, -1, 1]T
Slide36“varimax” procedure
find spiky factors without changing P
start with P svd() factorsrotate pairs of them in their plane by angle θto maximize the overall spikiness
Slide37f
B
fAf’Bf’Aq
Slide38determine θ by maximizing
Slide39after tedious trig the solution can be shown to be
Slide40and the new factors are
in this example A=3 and B=5
Slide41now one repeats for every pair of factors
and then iterates the whole process several times
until the whole set of factors is as spiky as possible
Slide42A)
B
)f5f2f3f4f’5f’2f’3f’4SiO2TiO2Al2O3FeOtotalMgO
CaO
Na
2
O
K
2
O
example: Atlantic Rock dataset
Slide43Part 2: Empirical Orthogonal Functions
Slide44row number in the sample matrix could be meaningful
example: samples collected at a succession of times
time
Slide45column number in the sample matrix could be meaningful
example: concentration of the same chemical element at a sequence of positions
distance
Slide46S = CF
becomes
Slide47S = CF
becomes
distance dependencetime dependence
Slide48S = CF
becomes
each loading: a temporal pattern of variability of the corresponding factoreach factor:a spatial pattern of variability of the element
Slide49S = CF
becomes
there are P patterns and they are sorted into order of importance
Slide50S = CF
becomes
factors now called EOF’s (empirical orthogonal functions)
Slide51example
sea surface temperature in the Pacific Ocean
Slide5229
S
29N124E290Elatitudelongitudeequatorial Pacific Oceansea surface temperature (black = warm)CAC Sea Surface Temperature
Slide53Slide54the image is 30 by 84 pixels in size, or 2520 pixels total
to use
svd(), the image must be unwrapped into a vector of length 2520
Slide552520 positions in the equatorial Pacific ocean
399 times
“element” means temperature
Slide56s
ingular values,
Siiindex, isingular values
Slide57s
ingular values,
Siiindex, isingular valuesno clear cutoff for P, but the first 10 singular values are considerably larger than the rest
Slide58Slide59Slide60Slide61Slide62Slide63Slide64using SVD to approximate data
Slide65S=C
M
FMS=CPFPS≈CP’FP’ With M EOF’s, the data is fit exactlyWith P chosen to exclude only zero singular values, the data is fit exactlyWith P’<P, small non-zero singular values are excluded too, and the data is fit only approximately
Slide66A) Original
B) Based on first 5 EOF’s