This document discusses parameter estimation, model selection, and hypothesis testing for time series models. It begins by explaining maximum likelihood estimation for linear models like MA(1) and ARMA(1,1). Then it introduces the Akaike Information Criterion (AIC) for model selection, choosing the model with the minimum AIC value. Finally, it describes using hypothesis testing to determine which class an unknown signal belongs to by calculating the likelihood of the signal under models of each class. The document concludes by providing a demo example that estimates models for two classes of EEG data, selects the best model for each class using AIC, and applies hypothesis testing to determine the class of new test data.
APPROACHES IN USING EXPECTATIONMAXIMIZATION ALGORITHM FOR MAXIMUM LIKELIHOOD ...cscpconf
EM algorithm is popular in maximum likelihood estimation of parameters for state-space models. However, extant approaches for the realization of EM algorithm are still not able to fulfill the task of identification systems, which have external inputs and constrained parameters. In this paper, we propose new approaches for both initial guessing and MLE of the parameters of a constrained state-space model with an external input. Using weighted least square for the initial guess and the partial differentiation of the joint log-likelihood function for the EM algorithm, we estimate the parameters and compare the estimated values with the “actual” values, which are set to generate simulation data. Moreover, asymptotic variances of the estimated parameters are calculated when the sample size is large, while statistics of the estimated parameters are obtained through bootstrapping when the sample size issmall. The results demonstrate that the estimated values are close to the “actual” values.Consequently, our approaches are promising and can applied in future research.
Ch 07 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片Chyi-Tsong Chen
The slides of Chapter 7 of the book entitled "MATLAB Applications in Chemical Engineering": Parameter Estimation. Author: Prof. Chyi-Tsong Chen (陳奇中教授); Center for General Education, National Quemoy University; Kinmen, Taiwan; E-mail: chyitsongchen@gmail.com.
Ebook purchase: https://play.google.com/store/books/details/MATLAB_Applications_in_Chemical_Engineering?id=kpxwEAAAQBAJ&hl=en_US&gl=US
International Journal of Engineering Research and Development (IJERD)IJERD Editor
journal publishing, how to publish research paper, Call For research paper, international journal, publishing a paper, IJERD, journal of science and technology, how to get a research paper published, publishing a paper, publishing of journal, publishing of research paper, reserach and review articles, IJERD Journal, How to publish your research paper, publish research paper, open access engineering journal, Engineering journal, Mathemetics journal, Physics journal, Chemistry journal, Computer Engineering, Computer Science journal, how to submit your paper, peer reviw journal, indexed journal, reserach and review articles, engineering journal, www.ijerd.com, research journals,
yahoo journals, bing journals, International Journal of Engineering Research and Development, google journals, hard copy of journal
Multi objective optimization and Benchmark functions resultPiyush Agarwal
Implemented Strength Pareto Evolutionary Algorithm (SPEA 2) and Non Dominated Sorting Genetic Algorithm (NSGA II) in MATLAB, Guide Assistant Prof. Divy Kumar, MNNIT Allahabad.
The two algorithms are use to solve multiobjective functions. Tested the algorithms on all the benchmark functions.
Applied both the algorithms to solve Portfolio Optimization satisfying different types of constraints to derive the optimal portfolio.
Abstract: This PDSG workshop introduces basic concepts of multiple linear regression in machine learning. Concepts covered are Feature Elimination and Backward Elimination, with examples in Python.
Level: Fundamental
Requirements: Should have some experience with Python programming.
APPROACHES IN USING EXPECTATIONMAXIMIZATION ALGORITHM FOR MAXIMUM LIKELIHOOD ...cscpconf
EM algorithm is popular in maximum likelihood estimation of parameters for state-space models. However, extant approaches for the realization of EM algorithm are still not able to fulfill the task of identification systems, which have external inputs and constrained parameters. In this paper, we propose new approaches for both initial guessing and MLE of the parameters of a constrained state-space model with an external input. Using weighted least square for the initial guess and the partial differentiation of the joint log-likelihood function for the EM algorithm, we estimate the parameters and compare the estimated values with the “actual” values, which are set to generate simulation data. Moreover, asymptotic variances of the estimated parameters are calculated when the sample size is large, while statistics of the estimated parameters are obtained through bootstrapping when the sample size issmall. The results demonstrate that the estimated values are close to the “actual” values.Consequently, our approaches are promising and can applied in future research.
Ch 07 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片Chyi-Tsong Chen
The slides of Chapter 7 of the book entitled "MATLAB Applications in Chemical Engineering": Parameter Estimation. Author: Prof. Chyi-Tsong Chen (陳奇中教授); Center for General Education, National Quemoy University; Kinmen, Taiwan; E-mail: chyitsongchen@gmail.com.
Ebook purchase: https://play.google.com/store/books/details/MATLAB_Applications_in_Chemical_Engineering?id=kpxwEAAAQBAJ&hl=en_US&gl=US
International Journal of Engineering Research and Development (IJERD)IJERD Editor
journal publishing, how to publish research paper, Call For research paper, international journal, publishing a paper, IJERD, journal of science and technology, how to get a research paper published, publishing a paper, publishing of journal, publishing of research paper, reserach and review articles, IJERD Journal, How to publish your research paper, publish research paper, open access engineering journal, Engineering journal, Mathemetics journal, Physics journal, Chemistry journal, Computer Engineering, Computer Science journal, how to submit your paper, peer reviw journal, indexed journal, reserach and review articles, engineering journal, www.ijerd.com, research journals,
yahoo journals, bing journals, International Journal of Engineering Research and Development, google journals, hard copy of journal
Multi objective optimization and Benchmark functions resultPiyush Agarwal
Implemented Strength Pareto Evolutionary Algorithm (SPEA 2) and Non Dominated Sorting Genetic Algorithm (NSGA II) in MATLAB, Guide Assistant Prof. Divy Kumar, MNNIT Allahabad.
The two algorithms are use to solve multiobjective functions. Tested the algorithms on all the benchmark functions.
Applied both the algorithms to solve Portfolio Optimization satisfying different types of constraints to derive the optimal portfolio.
Abstract: This PDSG workshop introduces basic concepts of multiple linear regression in machine learning. Concepts covered are Feature Elimination and Backward Elimination, with examples in Python.
Level: Fundamental
Requirements: Should have some experience with Python programming.
Ch 06 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片Chyi-Tsong Chen
The slides of Chapter 6 of the book entitled "MATLAB Applications in Chemical Engineering": Process Optimization. Author: Prof. Chyi-Tsong Chen (陳奇中教授); Center for General Education, National Quemoy University; Kinmen, Taiwan; E-mail: chyitsongchen@gmail.com.
Ebook purchase: https://play.google.com/store/books/details/MATLAB_Applications_in_Chemical_Engineering?id=kpxwEAAAQBAJ&hl=en_US&gl=US
In MATLAB, a vector is created by assigning the elements of the vector to a variable. This can be done in several ways depending on the source of the information.
—Enter an explicit list of elements
—Load matrices from external data files
—Using built-in functions
—Using own functions in M-files
ADAPTIVE CONTROL AND SYNCHRONIZATION OF SPROTT-I SYSTEM WITH UNKNOWN PARAMETERSijscai
This paper derives new results for the adaptive control and synchronization design of the Sprott-I chaotic system (1994), when the system parameters are unknown. First, we build an adaptive controller to stabilize the Sprott-I chaotic system to its unstable equilibrium at the origin. Then we build an adaptive
synchronizer to achieve global chaos synchronization of the identical Sprott-I chaotic systems with unknown parameters. The results derived for adaptive stabilization and adaptive synchronization for the Sprott-I chaotic system have been established using adaptive control theory and Lyapunov stability
theory. Numerical simulations have been shown to demonstrate the effectiveness of the adaptive control and synchronization schemes derived in this paper for the Sprott-I chaotic system.
I am Ben R. I am a Statistics Assignment Expert at statisticshomeworkhelper.com. I hold a Ph.D. in Statistics, from University of Denver, USA. I have been helping students with their homework for the past 5 years. I solve assignments related to Statistics.
Visit statisticshomeworkhelper.com or email info@statisticshomeworkhelper.com.
You can also call on +1 678 648 4277 for any assistance with Statistics Assignments.
Psychtoolbox (PTB) practical course by Volodymyr B. Bogdanov, Kyiv 2017, Day 1Volodymyr Bogdanov
Day 1 of Psychtoolbox practical course is dedicated to MATLAB functions important for building experimental paradigms
The code file can be downloaded:
https://drive.google.com/file/d/0B7HyuFpj0ptpcXF4ZzcwaWpDRUU/view?usp=sharing
I am Watson A. I am a Statistics Assignment Expert at statisticsassignmenthelp.com. I hold a Masters in Statistics from, Liberty University, USA
I have been helping students with their homework for the past 6 years. I solve assignments related to Statistics.
Visit statisticsassignmenthelp.com or email info@statisticsassignmenthelp.com.
You can also call on +1 678 648 4277 for any assistance with Statistics Assignments.
The issues about maneuvering target track prediction were discussed in this paper. Firstly, using Kalman filter which based on current statistical model describes the state of maneuvering target motion, thereby analyzing time range of the target maneuvering occurred. Then, predict the target trajectory in real time by the improved gray prediction model. Finally, residual test and posterior variance test model accuracy, model accuracy is accurate.
Ch 06 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片Chyi-Tsong Chen
The slides of Chapter 6 of the book entitled "MATLAB Applications in Chemical Engineering": Process Optimization. Author: Prof. Chyi-Tsong Chen (陳奇中教授); Center for General Education, National Quemoy University; Kinmen, Taiwan; E-mail: chyitsongchen@gmail.com.
Ebook purchase: https://play.google.com/store/books/details/MATLAB_Applications_in_Chemical_Engineering?id=kpxwEAAAQBAJ&hl=en_US&gl=US
In MATLAB, a vector is created by assigning the elements of the vector to a variable. This can be done in several ways depending on the source of the information.
—Enter an explicit list of elements
—Load matrices from external data files
—Using built-in functions
—Using own functions in M-files
ADAPTIVE CONTROL AND SYNCHRONIZATION OF SPROTT-I SYSTEM WITH UNKNOWN PARAMETERSijscai
This paper derives new results for the adaptive control and synchronization design of the Sprott-I chaotic system (1994), when the system parameters are unknown. First, we build an adaptive controller to stabilize the Sprott-I chaotic system to its unstable equilibrium at the origin. Then we build an adaptive
synchronizer to achieve global chaos synchronization of the identical Sprott-I chaotic systems with unknown parameters. The results derived for adaptive stabilization and adaptive synchronization for the Sprott-I chaotic system have been established using adaptive control theory and Lyapunov stability
theory. Numerical simulations have been shown to demonstrate the effectiveness of the adaptive control and synchronization schemes derived in this paper for the Sprott-I chaotic system.
I am Ben R. I am a Statistics Assignment Expert at statisticshomeworkhelper.com. I hold a Ph.D. in Statistics, from University of Denver, USA. I have been helping students with their homework for the past 5 years. I solve assignments related to Statistics.
Visit statisticshomeworkhelper.com or email info@statisticshomeworkhelper.com.
You can also call on +1 678 648 4277 for any assistance with Statistics Assignments.
Psychtoolbox (PTB) practical course by Volodymyr B. Bogdanov, Kyiv 2017, Day 1Volodymyr Bogdanov
Day 1 of Psychtoolbox practical course is dedicated to MATLAB functions important for building experimental paradigms
The code file can be downloaded:
https://drive.google.com/file/d/0B7HyuFpj0ptpcXF4ZzcwaWpDRUU/view?usp=sharing
I am Watson A. I am a Statistics Assignment Expert at statisticsassignmenthelp.com. I hold a Masters in Statistics from, Liberty University, USA
I have been helping students with their homework for the past 6 years. I solve assignments related to Statistics.
Visit statisticsassignmenthelp.com or email info@statisticsassignmenthelp.com.
You can also call on +1 678 648 4277 for any assistance with Statistics Assignments.
The issues about maneuvering target track prediction were discussed in this paper. Firstly, using Kalman filter which based on current statistical model describes the state of maneuvering target motion, thereby analyzing time range of the target maneuvering occurred. Then, predict the target trajectory in real time by the improved gray prediction model. Finally, residual test and posterior variance test model accuracy, model accuracy is accurate.
Principal Components Analysis, Calculation and VisualizationMarjan Sterjev
The article explains dimension reduction principles, PCA algorithm and mathematics behind. The PCA calculation and data projection is demonstrated in R, Python and Apache Spark. Finally the results are visualized with D3.js.
The aim of this presentation is to revise the functional regression models with scalar response (Linear, Nonlinear and Semilinear) and the extension to the more general case where the response belongs to the exponential family (binomial, poisson, gamma, ...). This extension allows to develop new functional classification methods based on this regression models. Some examples along with code implementation in R are provided during the talk. Lecturer: Manuel Febrero Bande, Univ. de Santiago de Compostela, Spain.
Opening of our Deep Learning Lunch & Learn series. First session: introduction to Neural Networks, Gradient descent and backpropagation, by Pablo J. Villacorta, with a prologue by Fernando Velasco
In order to provide the design guidance for a multiple stage refrigerator for hosting a quantum computing device targeting for unmanned transportation platform. We provides a modeling analysis based on a preliminary single stage test data, by using Brain Storm Optimization algorithm.
Event Management System Vb Net Project Report.pdfKamal Acharya
In present era, the scopes of information technology growing with a very fast .We do not see any are untouched from this industry. The scope of information technology has become wider includes: Business and industry. Household Business, Communication, Education, Entertainment, Science, Medicine, Engineering, Distance Learning, Weather Forecasting. Carrier Searching and so on.
My project named “Event Management System” is software that store and maintained all events coordinated in college. It also helpful to print related reports. My project will help to record the events coordinated by faculties with their Name, Event subject, date & details in an efficient & effective ways.
In my system we have to make a system by which a user can record all events coordinated by a particular faculty. In our proposed system some more featured are added which differs it from the existing system such as security.
Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSEDuvanRamosGarzon1
AIRCRAFT GENERAL
The Single Aisle is the most advanced family aircraft in service today, with fly-by-wire flight controls.
The A318, A319, A320 and A321 are twin-engine subsonic medium range aircraft.
The family offers a choice of engines
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)MdTanvirMahtab2
This presentation is about the working procedure of Shahjalal Fertilizer Company Limited (SFCL). A Govt. owned Company of Bangladesh Chemical Industries Corporation under Ministry of Industries.
Democratizing Fuzzing at Scale by Abhishek Aryaabh.arya
Presented at NUS: Fuzzing and Software Security Summer School 2024
This keynote talks about the democratization of fuzzing at scale, highlighting the collaboration between open source communities, academia, and industry to advance the field of fuzzing. It delves into the history of fuzzing, the development of scalable fuzzing platforms, and the empowerment of community-driven research. The talk will further discuss recent advancements leveraging AI/ML and offer insights into the future evolution of the fuzzing landscape.
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfKamal Acharya
The College Bus Management system is completely developed by Visual Basic .NET Version. The application is connect with most secured database language MS SQL Server. The application is develop by using best combination of front-end and back-end languages. The application is totally design like flat user interface. This flat user interface is more attractive user interface in 2017. The application is gives more important to the system functionality. The application is to manage the student’s details, driver’s details, bus details, bus route details, bus fees details and more. The application has only one unit for admin. The admin can manage the entire application. The admin can login into the application by using username and password of the admin. The application is develop for big and small colleges. It is more user friendly for non-computer person. Even they can easily learn how to manage the application within hours. The application is more secure by the admin. The system will give an effective output for the VB.Net and SQL Server given as input to the system. The compiled java program given as input to the system, after scanning the program will generate different reports. The application generates the report for users. The admin can view and download the report of the data. The application deliver the excel format reports. Because, excel formatted reports is very easy to understand the income and expense of the college bus. This application is mainly develop for windows operating system users. In 2017, 73% of people enterprises are using windows operating system. So the application will easily install for all the windows operating system users. The application-developed size is very low. The application consumes very low space in disk. Therefore, the user can allocate very minimum local disk space for this application.
1. Stochastic Section # 6
Linear Estimation, Model Selection & Hypothesis Test
Eslam Adel
April 10, 2018
1 Parameters Estimation of Model
Estimation of model parameters is an optimization problem. There is different methods for parameter estima-
tion. We talked about minimizing mean square error criteria. Here we have another one which is maximum
likelihood criteria.
1.1 Maximum Likelihood method (ML)
• Maximize the likelihood function or joint probability density function (jPDF).
• jPDF f(x) = f(x0, x1, x2, . . . , xN−1)
• For uncorrelated gaussian vector (independent)
f(x) = f(x0, x1, x2, . . . , xN ) = f(x0)f(x1)f(x2) . . . f(xN−1)
• For correlated signals use conditional probability
f(x) = f(x0, x1, x2, . . . , xN ) = f(xn|xn−1)f(xn−1|xn−2) . . . f(x2|x1)f(x1|x0)f(x0)
• We actually maximize the log(f(x)) where log operator converts multiplication to summation.
• Note: Solving optimization problem to find values of unknowns is out of study.
1.1.1 Example 1
Find the jPDF for the following MA(1) model.
x(n) = (n) + b1 (n − 1) (1)
Solution
n = 0, x0 = 0
n = 1, x1 = 1 + b1 0
n = 2, x2 = 2 + b1 1
In Matrix form
x0
x1
x2
...
xN−1
=
1 0 0 . . . 0
b1 1 0 . . . 0
0 b1 1 . . . 0
...
...
...
...
...
0 0 . . . b1 1
0
1
2
...
N−1
B =
1 0 0 . . . 0
b1 1 0 . . . 0
0 b1 1 . . . 0
...
...
...
...
...
0 0 . . . b1 1
1
2. So the model will be x = B where ∼ N(0, ) (uncorrelated White gaussian noise).
So x ∼ N(mx, x)
mx = E[x] = E[B ] = BE[ ] = 0
x = E[xxT
] − mxmT
x
x = E[B (B )T
] − 0
x = BE[ T
]BT
= B BT
Therefore
x ∼ N(0, x), x = B BT
And jPDF (likelihood function) :
f(x) =
1
(2π)
N
2 (det( x))
1
2
e
−1
2 (xT −1
x x)
(2)
1.1.2 Example 2
Find the jPDF for the following ARMA(1, 1) model.
x(n) = a1x(n − 1) + (n) + b1 (n − 1) (3)
Solution
Let y(n) = x(n) − a1x(n − k)
n = 0, y0 = x0
n = 1, y1 = x1 − a1x0
n = 2, y2 = x2 − a1x1
In Matrix form
y0
y1
y2
...
yN−1
=
1 0 0 . . . 0
−a1 1 0 . . . 0
0 −a1 1 . . . 0
...
...
...
...
...
0 0 . . . −a1 1
x0
x1
x2
...
xN−1
A =
1 0 0 . . . 0
−a1 1 0 . . . 0
0 −a1 1 . . . 0
...
...
...
...
...
0 0 . . . −a1 1
So y = Ax
And also y(n) = (n) + b1 (n − 1)
n = 0, y0 = 0
n = 1, y1 = 1 + b1 0
n = 2, y2 = 2 + b1 1
In Matrix form
y0
y1
y2
...
yN−1
=
1 0 0 . . . 0
b1 1 0 . . . 0
0 b1 1 . . . 0
...
...
...
...
...
0 0 . . . b1 1
0
1
2
...
N−1
B =
1 0 0 . . . 0
b1 1 0 . . . 0
0 b1 1 . . . 0
...
...
...
...
...
0 0 . . . b1 1
2
3. y = Ax = B → x = A−1
B where ∼ N(0, ) (uncorrelated White gaussian noise).
So x ∼ N(mx, x)
mx = E[x] = E[A−1
B ] = A−1
BE[ ] = 0
x = E[xxT
] − mxmT
x
x = E[A−1
B (A−1
B )T
] − 0
x = A−1
BE[ T
]BT
(A−1
)T
= A−1
B BT
(A−1
)T
Therefore
x ∼ N(0, x), x = A−1
B BT
(A−1
)T
And jPDF (likelihood function) :
f(x) =
1
(2π)
N
2 (det( x))
1
2
e
−1
2 (xT −1
x x)
(4)
2 Model Selection
Model selection is the next step after estimation of different models for the same signal. We will study a method
to compare different models and select best one of them.
2.1 AIC
• Akaik’s Information Criteria
• Gives a measure of relative quality of statistical models.
• It gives an estimate of relative information loss using such model.
• Best model has minimum information loss (Minimum AIC value)
AIC = 2k − 2ln(ˆL) (5)
where k is number of model parameters. ˆL is an estimate value of likelihood.
3 Hypothesis test
We have two or more different classes of signals. Each class is modeled with a specific model. For a new un-
known signal. We need to determine which class it belongs to. The idea is to calculate likelihood (probability)
of this signal given models of all classes and select most probable class (Max likelihood value).
For unknown signal x with N class data calculate
f1(x|Model1), f2(x|Model2), f3(x|Model3) , . . . , fN (x|ModelN )
signal x belongs to class with maximum likelihood value.
4 Demo
This is a simple example that demonstrates how to estimate different models for your signal, select on of
estimated models based on its AIC value, and apply hypothesis test to determine the class of unknown signal
using predefined models. So steps are
• Model estimation
• Model selection
• Hypothesis test
3
4. 1 c l o s e a l l
2 clc , c l e a r
3 %% Load EEG Dataset
4 % t h i s i s a motor imagery dataset . We have two c l a s s e s .
5 % Class 1 where subject imagines moving h i s r i g h t arm .
6 % Class 2 where subject imagines moving h i s l e f t arm .
7 % There i s d i f f e r e n t EEG channels C3 , C4 and Cz
8 % We w i l l s e l e c t only one of them .
9 load ( ’ dataset BCIcomp1 . mat ’ )
10
11 % We w i l l use f i r s t Channel from c l a s s 1
12 % Note : detrend −> makes the s i g n a l zero mean
13 dataClass1 = detrend ( x t r a i n (500:800 ,1 ,1) ) ;
14 %f i r s t Channel from c l a s s 2
15 dataClass2 = detrend ( x t r a i n (500:800 ,1 ,2) ) ;
16 data = [ dataClass1 , dataClass2 ] ;
17 %Test data from c l a s s 1
18 testData = detrend ( x t r a i n (801:1000 ,1 ,1) ) ;
19
20 % Empty c e l l array to be updated with s e l e c t e d models f o r both c l a s s 1 and 2
21 selectedModels = c e l l (2 ,1) ;
22 %% [ 1 ] Models Estimation
23 % MA(2) , AR(2) , ARMA(1 ,2) Models
24 % We have two c l a s s e s so we w i l l estimate models and s e l e c t one f o r each c l a s s .
25 f o r i = 1:2
26 [ model MA2 , ˜ , logL MA2 ] = estimate ( arima (0 ,0 ,2) , data ( : , i ) ) ;
27 [ model AR2 , ˜ , logL AR2 ] = estimate ( arima (2 ,0 ,0) , data ( : , i ) ) ;
28 [ model ARMA12 , ˜ , logL ARMA12 ] = estimate ( arima (1 ,0 ,2) , data ( : , i ) ) ;
29 models = {model MA2 , model AR2 , model ARMA12 };
30
31 %% [ 2 ] Model S e l e c t i o n based on AIC value
32 %Calculte Akiak ’ s information c r i t e r i a f o r a l l models
33 aic MA2 = 2∗2 − 2∗logL MA2 ;
34 aic AR2 = 2∗2 − 2∗logL AR2 ;
35 aic ARMA12 = 2∗3 − 2∗logL ARMA12 ;
36
37 % S e l e c t model with minimum a i c
38 [ ˜ , idx ] = min ( [ aic MA2 , aic AR2 , aic ARMA12 ] ) ;
39 % Update s e l e c t e d models
40 selectedModels { i } = models{ idx };
41 end
42
43 % I n i t i a l i z e an array to be updated with l i k e l i h o o d values f o r each c l a s s
44 l i k e l i h o o d V a l s = zeros (1 ,2) ;
45 %% [ 3 ] Hypothesis t e s t
46 f o r i = 1:2
47 % Calculate l i k e l i h o o d estimate f o r testData using s e l e c t e d model of each
48 % c l a s s
49 [ ˜ , ˜ , logL ] = estimate ( selectedModels { i } , testData ) ;
50 l i k e l i h o o d V a l s ( i ) = logL ;
51 end
52 %S e l e c t c l a s s with maximum l i k e l i h o o d value
53 [ ˜ , testDataClass ] = max( l i k e l i h o o d V a l s ) ;
54 display ( testDataClass )
Listing 1: Section Demo
You can download section demo from repository
5 Useful links
• System Identification Toolbox examples
• Different Model estimation methods
• estimate function
4