SlideShare a Scribd company logo
1 of 20
Download to read offline
An Introduction to Functional Data Analysis (FDA)
Rene Essomba, Sugnet Lubbe
Department of Statistical Sciences, University of Cape Town
franckess48@gmail.com
November 2013
(Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 1 / 20
Break-Down
To represent the data in ways that aid further analysis.
To display the data so as to highlight various characteristics.
To study important sources of pattern and variation among the data.
To explain variation in dependent variable by using independent
variable information.
To compare two or more sets of data with respect to certain types of
variation.
For illustration, the R-packages fda and fda.usc will be used.
(Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 2 / 20
Overview
1 Introduction
2 Basis Representation
Fourier Basis
B-Splines
3 Summary Statistics for functional data
Functional means and variances
Covariance and Correlation functions
4 Functional Principal Component Analysis (fPCA)
5 Functional Linear Regression Model (fLRM)
6 Some References
(Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 3 / 20
Introduction
The Main Equation
Zk(ti ) = X(ti ) + (ti ) for i = 1, . . . , n & k = 1, . . . , N
Zk(ti ) is the noisy observation from the k-th cluster.
X(ti ) is the value of a continuous underlying process.
(ti ) is the error term.
N.B.: N denotes the number of observed curves on a discrete grid
(ti , i = 1, . . . , n)
(Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 4 / 20
Introduction
Example: The Canadian Weather (temperatures and precipitations)
daily observations (i.e. Zk(ti ));
35 different weather stations (i.e. k = 1, . . . , 35);
observed at time ti = 0.5, . . . , 364.5.
Therefore, our observed pairs will be (ti , Zk(ti )).
Plot of the raw data for the station located in Saint Johns & Halifax.
(Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 5 / 20
Basis Representation
Example: The Canadian Weather (continued)
X(ti ) continuous process observed at 365 discrete observations.
Finding a linear combination of K basis functions (0 < K < 365)
X(t) ≈
K
k=1
θkφk(t) with φk(t) as basis functions and θk as the
coefficients.
Types of basis functions:
Fourier Basis
B-Splines
Remark: The optimal number of basis functions is determined by using a
generalized cross validation criterion (GCV).
(Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 6 / 20
Fourier Basis
Definition
Useful for periodic data, Fourier basis expansion is composed by the
following orthonormal functions:
φo(t) = 1/
√
T, φ2r−1(t) =
sin(rωt)
T/2
and φ2r (t) =
cos(rωt)
T/2
,
with r = 1, ..., L/2 where L is an even integer. The period T is by default
the range of discretization points t and ω = 2π/T.
In R: create.fourier.basis(rangeval, nbasis,...) (fda package).
(Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 7 / 20
Fourier Basis
Figure : Fourier Basis plot with 7 basis functions
(Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 8 / 20
B-Splines
Definition
Appropriate for non-periodic data.
Selecting a series of knots along the t-axis τ1 < τ2 < ... < τL+2M
where M is the order of the spline;
φk,m(t) = t−τk
τk+m−1−τk
φk,m−1(t) + τk+m−t
τk+m−τk+1
φk+1,m−1(t) for
k = 1, ..., L + 2M − m and φk,1(t) = I[τk ;τk+1](t).
In R: create.bspline.basis(rangeval,nbasis,norder,...) (fda package)
(Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 9 / 20
B-Splines
Figure : B-Splines of order 4
(Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 10 / 20
Basis Representation
(Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 11 / 20
Summary Statistics
The usual tools used for summarizing data in an univariate context remain
the same for functional data
Definition
functional mean: ¯X(t) = N−1
N
i=1
Xi (t).
functional variance: Var(X(t)) = (N − 1)−1
N
i=1
(Xi (t) − ¯X(t))2.
functional covariance:
Cov(X(t), X(s)) = (N − 1)−1
N
i=1
(Xi (s) − ¯X(s))(Xi (t) − ¯X(t)) .
In R, mean.fd & var.fd (fda package).
Remark: The values returned will also be objects of class fd & fdata.
(Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 12 / 20
Mean Function and Standard Deviation
Figure : Mean temperature and standard deviation
(Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 13 / 20
Correlation Function
Figure : Temperature Correlation Function
(Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 14 / 20
Functional Principal Component Analysis (f PCA)
Primarily used as a tool for dimension reduction, it is designed to explain
the source of variation within the functional data created.
Algorithm
1 Find the function ξ1(t) of norm 1 (i.e. ξ2
1(t)dt = 1) such that
N−1
i f 2
i1 is maximized with fi1 = ξ1(t)Xc
i (t)dt.
2 On the mth step (m > 1), compute ξm(t) with the orthogonality
constraint(s): ξm(t)ξk(t)dt = 0, for k < m.
The functional data will therefore be: ˆXi (t) = M
k=1 fik
ˆξk(t) where
fik = ξk(t)Xc
i (t)dt with Xc
i = Xi (t) − ¯X(t).
f PCA in R: fdata2pc(fdataobj, ncomp,...) (fda.usc package)
(Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 15 / 20
Functional Principal Component Analysis (f PCA)
Example (Canadian Weather)
R> temp.svd <- fdata2pc(tempdat.fdata, ncomp=3)
R> norm.fdata(temp.svd$rotation[1:2])
[,1]
[1,] 0.9976567
[2,] 0.9980333
# With 3 components that explained 98.56% of the
variability of explicative variables.
# Variability for each component (%): PC1 88.03 PC2 8.47
PC3 2.06
(Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 16 / 20
Functional Principal Component Analysis (f PCA)
Figure : Loadings for PC1 & PC2
(Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 17 / 20
Functional Linear Regression Model (f LRM)
Consider the following functional linear regression models:
Functional response with multivariate covariates:
yi (t) = β1(t)xi1 + · · · + βp(t)xip + i (t); i = 1, . . . , N
Scalar response with functional covariates:
yi = α +
T
0
p
j=1
βj (s)xij (s)ds + i ; i = 1, . . . , N; s ∈ [0, T].
Functional response with functional covariates:
yi (t) = α(t) +
T
0
p
j=1
βj (t, s)xij (s)ds + i (t); i = 1, . . . , N; s ∈ [0, T].
(Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 18 / 20
Useful References
M. Febrero-Bande, M. O. De La Fuente (2012)
Statistical Computing in Functional Data Analysis: The R Package fda.usc.
J. O. Ramsay, G. Hooker and S. Graves (2009)
Functional Data Analysis in R and Matlab.
T. Hastie, R. Tibshirani, J. Friedman (2009)
The Elements of Statistical Learning.
J. O. Ramsay and B. W. Silverman (2005)
Functional Data Analysis
Carl de Boor (1978),
A practical guide to splines, Springer-Verlag, New York Heidelberg Berlin.
(Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 19 / 20
(Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 20 / 20

More Related Content

What's hot

What's hot (20)

Chapter 12 outlier
Chapter 12 outlierChapter 12 outlier
Chapter 12 outlier
 
Completely randomized design
Completely randomized designCompletely randomized design
Completely randomized design
 
Introduction to R Graphics with ggplot2
Introduction to R Graphics with ggplot2Introduction to R Graphics with ggplot2
Introduction to R Graphics with ggplot2
 
IBM Data Analyst Professional Certificate - C01 - W01.pptx
IBM Data Analyst Professional Certificate - C01 - W01.pptxIBM Data Analyst Professional Certificate - C01 - W01.pptx
IBM Data Analyst Professional Certificate - C01 - W01.pptx
 
Introduction to regression
Introduction to regressionIntroduction to regression
Introduction to regression
 
Basic Concepts of Experimental Design & Standard Design ( Statistics )
Basic Concepts of Experimental Design & Standard Design ( Statistics )Basic Concepts of Experimental Design & Standard Design ( Statistics )
Basic Concepts of Experimental Design & Standard Design ( Statistics )
 
PhD Oral Defense of Md Kafiul Islam on "ARTIFACT CHARACTERIZATION, DETECTION ...
PhD Oral Defense of Md Kafiul Islam on "ARTIFACT CHARACTERIZATION, DETECTION ...PhD Oral Defense of Md Kafiul Islam on "ARTIFACT CHARACTERIZATION, DETECTION ...
PhD Oral Defense of Md Kafiul Islam on "ARTIFACT CHARACTERIZATION, DETECTION ...
 
Data cleansing
Data cleansingData cleansing
Data cleansing
 
Role of Bellman's Equation in Reinforcement Learning
Role of Bellman's Equation in Reinforcement LearningRole of Bellman's Equation in Reinforcement Learning
Role of Bellman's Equation in Reinforcement Learning
 
Become a Data Analyst
Become a Data Analyst Become a Data Analyst
Become a Data Analyst
 
7 anova chi square test
 7 anova chi square test 7 anova chi square test
7 anova chi square test
 
kinds of analytics
kinds of analyticskinds of analytics
kinds of analytics
 
Statistics and its application
Statistics and its applicationStatistics and its application
Statistics and its application
 
Big data-ppt
Big data-pptBig data-ppt
Big data-ppt
 
Descriptive Statistics
Descriptive StatisticsDescriptive Statistics
Descriptive Statistics
 
Principal Component Analysis
Principal Component AnalysisPrincipal Component Analysis
Principal Component Analysis
 
Data Science Training | Data Science Tutorial | Data Science Certification | ...
Data Science Training | Data Science Tutorial | Data Science Certification | ...Data Science Training | Data Science Tutorial | Data Science Certification | ...
Data Science Training | Data Science Tutorial | Data Science Certification | ...
 
Data Transformation.ppt
Data Transformation.pptData Transformation.ppt
Data Transformation.ppt
 
Introduction - Using Stata
Introduction - Using StataIntroduction - Using Stata
Introduction - Using Stata
 
Two sample t-test
Two sample t-testTwo sample t-test
Two sample t-test
 

Viewers also liked

Kernel fisher discriminant
Kernel fisher discriminantKernel fisher discriminant
Kernel fisher discriminant
Đỗ Hợp
 
Face recognition using laplacian faces
Face recognition using laplacian facesFace recognition using laplacian faces
Face recognition using laplacian faces
Pulkiŧ Sharma
 
Discriminant analysis
Discriminant analysisDiscriminant analysis
Discriminant analysis
Bhasker Rajan
 
face recognition system
face recognition systemface recognition system
face recognition system
Anil Kumar
 
T18 discriminant analysis
T18 discriminant analysisT18 discriminant analysis
T18 discriminant analysis
kompellark
 
Hướng dẫn sử dụng slide share
Hướng dẫn sử dụng  slide shareHướng dẫn sử dụng  slide share
Hướng dẫn sử dụng slide share
Ngọc Khánh
 

Viewers also liked (19)

Application of Fisher Linear Discriminant Analysis to Speech/Music Classifica...
Application of Fisher Linear Discriminant Analysis to Speech/Music Classifica...Application of Fisher Linear Discriminant Analysis to Speech/Music Classifica...
Application of Fisher Linear Discriminant Analysis to Speech/Music Classifica...
 
Kernel fisher discriminant
Kernel fisher discriminantKernel fisher discriminant
Kernel fisher discriminant
 
Face recognition using laplacian faces
Face recognition using laplacian facesFace recognition using laplacian faces
Face recognition using laplacian faces
 
Face recognition using LDA
Face recognition using LDAFace recognition using LDA
Face recognition using LDA
 
Discriminant analysis
Discriminant analysisDiscriminant analysis
Discriminant analysis
 
face recognition system
face recognition systemface recognition system
face recognition system
 
LDA
LDALDA
LDA
 
Linear Discriminant Analysis and Its Generalization
Linear Discriminant Analysis and Its GeneralizationLinear Discriminant Analysis and Its Generalization
Linear Discriminant Analysis and Its Generalization
 
T18 discriminant analysis
T18 discriminant analysisT18 discriminant analysis
T18 discriminant analysis
 
PCA vs LDA
PCA vs LDAPCA vs LDA
PCA vs LDA
 
Understandig PCA and LDA
Understandig PCA and LDAUnderstandig PCA and LDA
Understandig PCA and LDA
 
Lda
LdaLda
Lda
 
LDA presentation
LDA presentationLDA presentation
LDA presentation
 
discriminant analysis
discriminant analysisdiscriminant analysis
discriminant analysis
 
Discriminant analysis
Discriminant analysisDiscriminant analysis
Discriminant analysis
 
Discriminant analysis
Discriminant analysisDiscriminant analysis
Discriminant analysis
 
Hướng dẫn sử dụng slide share
Hướng dẫn sử dụng  slide shareHướng dẫn sử dụng  slide share
Hướng dẫn sử dụng slide share
 
LDA Beginner's Tutorial
LDA Beginner's TutorialLDA Beginner's Tutorial
LDA Beginner's Tutorial
 
Iris data analysis example in R
Iris data analysis example in RIris data analysis example in R
Iris data analysis example in R
 

Similar to Introduction to Functional Data Analysis

A New Enhanced Method of Non Parametric power spectrum Estimation.
A New Enhanced Method of Non Parametric power spectrum Estimation.A New Enhanced Method of Non Parametric power spectrum Estimation.
A New Enhanced Method of Non Parametric power spectrum Estimation.
CSCJournals
 
Modeling and Querying Metadata in the Semantic Sensor Web: stRDF and stSPARQL
Modeling and Querying Metadata in the Semantic Sensor Web: stRDF and stSPARQLModeling and Querying Metadata in the Semantic Sensor Web: stRDF and stSPARQL
Modeling and Querying Metadata in the Semantic Sensor Web: stRDF and stSPARQL
Kostis Kyzirakos
 
Application of Artificial Neural Network (Ann) In Operation of Reservoirs
Application of Artificial Neural Network (Ann) In Operation of ReservoirsApplication of Artificial Neural Network (Ann) In Operation of Reservoirs
Application of Artificial Neural Network (Ann) In Operation of Reservoirs
IOSR Journals
 
Visualizing, Modeling and Forecasting of Functional Time Series
Visualizing, Modeling and Forecasting of Functional Time SeriesVisualizing, Modeling and Forecasting of Functional Time Series
Visualizing, Modeling and Forecasting of Functional Time Series
hanshang
 
2014-mo444-practical-assignment-02-paulo_faria
2014-mo444-practical-assignment-02-paulo_faria2014-mo444-practical-assignment-02-paulo_faria
2014-mo444-practical-assignment-02-paulo_faria
Paulo Faria
 
presentation
presentationpresentation
presentation
jie ren
 

Similar to Introduction to Functional Data Analysis (20)

A New Enhanced Method of Non Parametric power spectrum Estimation.
A New Enhanced Method of Non Parametric power spectrum Estimation.A New Enhanced Method of Non Parametric power spectrum Estimation.
A New Enhanced Method of Non Parametric power spectrum Estimation.
 
R Language Introduction
R Language IntroductionR Language Introduction
R Language Introduction
 
ppt0320defenseday
ppt0320defensedayppt0320defenseday
ppt0320defenseday
 
Reading Seminar (140515) Spectral Learning of L-PCFGs
Reading Seminar (140515) Spectral Learning of L-PCFGsReading Seminar (140515) Spectral Learning of L-PCFGs
Reading Seminar (140515) Spectral Learning of L-PCFGs
 
AlgorithmAnalysis2.ppt
AlgorithmAnalysis2.pptAlgorithmAnalysis2.ppt
AlgorithmAnalysis2.ppt
 
A walk through the intersection between machine learning and mechanistic mode...
A walk through the intersection between machine learning and mechanistic mode...A walk through the intersection between machine learning and mechanistic mode...
A walk through the intersection between machine learning and mechanistic mode...
 
Modeling and Querying Metadata in the Semantic Sensor Web: stRDF and stSPARQL
Modeling and Querying Metadata in the Semantic Sensor Web: stRDF and stSPARQLModeling and Querying Metadata in the Semantic Sensor Web: stRDF and stSPARQL
Modeling and Querying Metadata in the Semantic Sensor Web: stRDF and stSPARQL
 
Application of Artificial Neural Network (Ann) In Operation of Reservoirs
Application of Artificial Neural Network (Ann) In Operation of ReservoirsApplication of Artificial Neural Network (Ann) In Operation of Reservoirs
Application of Artificial Neural Network (Ann) In Operation of Reservoirs
 
The inverse scattering series for tasks associated with primaries: direct non...
The inverse scattering series for tasks associated with primaries: direct non...The inverse scattering series for tasks associated with primaries: direct non...
The inverse scattering series for tasks associated with primaries: direct non...
 
from_data_to_differential_equations.ppt
from_data_to_differential_equations.pptfrom_data_to_differential_equations.ppt
from_data_to_differential_equations.ppt
 
SIAM SEAS Talk Slides
SIAM SEAS Talk SlidesSIAM SEAS Talk Slides
SIAM SEAS Talk Slides
 
Colored inversion
Colored inversionColored inversion
Colored inversion
 
Visualizing, Modeling and Forecasting of Functional Time Series
Visualizing, Modeling and Forecasting of Functional Time SeriesVisualizing, Modeling and Forecasting of Functional Time Series
Visualizing, Modeling and Forecasting of Functional Time Series
 
Have you met Julia?
Have you met Julia?Have you met Julia?
Have you met Julia?
 
MSSISS riBART 20160321
MSSISS riBART 20160321MSSISS riBART 20160321
MSSISS riBART 20160321
 
ders 3.3 Unit root testing section 3 .pptx
ders 3.3 Unit root testing section 3 .pptxders 3.3 Unit root testing section 3 .pptx
ders 3.3 Unit root testing section 3 .pptx
 
MATHEMATICAL MODELING OF COMPLEX REDUNDANT SYSTEM UNDER HEAD-OF-LINE REPAIR
MATHEMATICAL MODELING OF COMPLEX REDUNDANT SYSTEM UNDER HEAD-OF-LINE REPAIRMATHEMATICAL MODELING OF COMPLEX REDUNDANT SYSTEM UNDER HEAD-OF-LINE REPAIR
MATHEMATICAL MODELING OF COMPLEX REDUNDANT SYSTEM UNDER HEAD-OF-LINE REPAIR
 
2014-mo444-practical-assignment-02-paulo_faria
2014-mo444-practical-assignment-02-paulo_faria2014-mo444-practical-assignment-02-paulo_faria
2014-mo444-practical-assignment-02-paulo_faria
 
I stata
I stataI stata
I stata
 
presentation
presentationpresentation
presentation
 

Recently uploaded

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Recently uploaded (20)

Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 

Introduction to Functional Data Analysis

  • 1. An Introduction to Functional Data Analysis (FDA) Rene Essomba, Sugnet Lubbe Department of Statistical Sciences, University of Cape Town franckess48@gmail.com November 2013 (Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 1 / 20
  • 2. Break-Down To represent the data in ways that aid further analysis. To display the data so as to highlight various characteristics. To study important sources of pattern and variation among the data. To explain variation in dependent variable by using independent variable information. To compare two or more sets of data with respect to certain types of variation. For illustration, the R-packages fda and fda.usc will be used. (Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 2 / 20
  • 3. Overview 1 Introduction 2 Basis Representation Fourier Basis B-Splines 3 Summary Statistics for functional data Functional means and variances Covariance and Correlation functions 4 Functional Principal Component Analysis (fPCA) 5 Functional Linear Regression Model (fLRM) 6 Some References (Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 3 / 20
  • 4. Introduction The Main Equation Zk(ti ) = X(ti ) + (ti ) for i = 1, . . . , n & k = 1, . . . , N Zk(ti ) is the noisy observation from the k-th cluster. X(ti ) is the value of a continuous underlying process. (ti ) is the error term. N.B.: N denotes the number of observed curves on a discrete grid (ti , i = 1, . . . , n) (Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 4 / 20
  • 5. Introduction Example: The Canadian Weather (temperatures and precipitations) daily observations (i.e. Zk(ti )); 35 different weather stations (i.e. k = 1, . . . , 35); observed at time ti = 0.5, . . . , 364.5. Therefore, our observed pairs will be (ti , Zk(ti )). Plot of the raw data for the station located in Saint Johns & Halifax. (Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 5 / 20
  • 6. Basis Representation Example: The Canadian Weather (continued) X(ti ) continuous process observed at 365 discrete observations. Finding a linear combination of K basis functions (0 < K < 365) X(t) ≈ K k=1 θkφk(t) with φk(t) as basis functions and θk as the coefficients. Types of basis functions: Fourier Basis B-Splines Remark: The optimal number of basis functions is determined by using a generalized cross validation criterion (GCV). (Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 6 / 20
  • 7. Fourier Basis Definition Useful for periodic data, Fourier basis expansion is composed by the following orthonormal functions: φo(t) = 1/ √ T, φ2r−1(t) = sin(rωt) T/2 and φ2r (t) = cos(rωt) T/2 , with r = 1, ..., L/2 where L is an even integer. The period T is by default the range of discretization points t and ω = 2π/T. In R: create.fourier.basis(rangeval, nbasis,...) (fda package). (Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 7 / 20
  • 8. Fourier Basis Figure : Fourier Basis plot with 7 basis functions (Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 8 / 20
  • 9. B-Splines Definition Appropriate for non-periodic data. Selecting a series of knots along the t-axis τ1 < τ2 < ... < τL+2M where M is the order of the spline; φk,m(t) = t−τk τk+m−1−τk φk,m−1(t) + τk+m−t τk+m−τk+1 φk+1,m−1(t) for k = 1, ..., L + 2M − m and φk,1(t) = I[τk ;τk+1](t). In R: create.bspline.basis(rangeval,nbasis,norder,...) (fda package) (Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 9 / 20
  • 10. B-Splines Figure : B-Splines of order 4 (Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 10 / 20
  • 11. Basis Representation (Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 11 / 20
  • 12. Summary Statistics The usual tools used for summarizing data in an univariate context remain the same for functional data Definition functional mean: ¯X(t) = N−1 N i=1 Xi (t). functional variance: Var(X(t)) = (N − 1)−1 N i=1 (Xi (t) − ¯X(t))2. functional covariance: Cov(X(t), X(s)) = (N − 1)−1 N i=1 (Xi (s) − ¯X(s))(Xi (t) − ¯X(t)) . In R, mean.fd & var.fd (fda package). Remark: The values returned will also be objects of class fd & fdata. (Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 12 / 20
  • 13. Mean Function and Standard Deviation Figure : Mean temperature and standard deviation (Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 13 / 20
  • 14. Correlation Function Figure : Temperature Correlation Function (Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 14 / 20
  • 15. Functional Principal Component Analysis (f PCA) Primarily used as a tool for dimension reduction, it is designed to explain the source of variation within the functional data created. Algorithm 1 Find the function ξ1(t) of norm 1 (i.e. ξ2 1(t)dt = 1) such that N−1 i f 2 i1 is maximized with fi1 = ξ1(t)Xc i (t)dt. 2 On the mth step (m > 1), compute ξm(t) with the orthogonality constraint(s): ξm(t)ξk(t)dt = 0, for k < m. The functional data will therefore be: ˆXi (t) = M k=1 fik ˆξk(t) where fik = ξk(t)Xc i (t)dt with Xc i = Xi (t) − ¯X(t). f PCA in R: fdata2pc(fdataobj, ncomp,...) (fda.usc package) (Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 15 / 20
  • 16. Functional Principal Component Analysis (f PCA) Example (Canadian Weather) R> temp.svd <- fdata2pc(tempdat.fdata, ncomp=3) R> norm.fdata(temp.svd$rotation[1:2]) [,1] [1,] 0.9976567 [2,] 0.9980333 # With 3 components that explained 98.56% of the variability of explicative variables. # Variability for each component (%): PC1 88.03 PC2 8.47 PC3 2.06 (Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 16 / 20
  • 17. Functional Principal Component Analysis (f PCA) Figure : Loadings for PC1 & PC2 (Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 17 / 20
  • 18. Functional Linear Regression Model (f LRM) Consider the following functional linear regression models: Functional response with multivariate covariates: yi (t) = β1(t)xi1 + · · · + βp(t)xip + i (t); i = 1, . . . , N Scalar response with functional covariates: yi = α + T 0 p j=1 βj (s)xij (s)ds + i ; i = 1, . . . , N; s ∈ [0, T]. Functional response with functional covariates: yi (t) = α(t) + T 0 p j=1 βj (t, s)xij (s)ds + i (t); i = 1, . . . , N; s ∈ [0, T]. (Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 18 / 20
  • 19. Useful References M. Febrero-Bande, M. O. De La Fuente (2012) Statistical Computing in Functional Data Analysis: The R Package fda.usc. J. O. Ramsay, G. Hooker and S. Graves (2009) Functional Data Analysis in R and Matlab. T. Hastie, R. Tibshirani, J. Friedman (2009) The Elements of Statistical Learning. J. O. Ramsay and B. W. Silverman (2005) Functional Data Analysis Carl de Boor (1978), A practical guide to splines, Springer-Verlag, New York Heidelberg Berlin. (Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 19 / 20
  • 20. (Rene Essomba & Sugnet Lubbe) Functional Data Analysis November 2013 20 / 20