Perform a principal component analysis on the dataset

Assignment Help MATLAB Programming
Reference no: EM13923478

1. For a domain defined between -5 ≤ x ≤ 5 -5

                                             - 5 ≤ y ≤ 5

                                               0 ≤ t 10

Generate a dataset with variability in space and time following:

f (x, y, t) = f1 (x, y, t) + f2 (x, y, t) + f3 (x, y, t)


• Standing wave oscillating in time:

f1(x,y,t) = Sin(0.2Πy) * Cos(0.5Πx) * (1 + Cos(2Πt))

• Trend (increasing magnitude in time) with random component:

f2(x, y, t) = 0.09 * t + ε where ε = N(0, 0.01)

• Spike in space at different times:

                                    -1 ≤ x ≤ 1  and

F3(x, y, t) = 0.8 if       =   -1 ≤ y ≤ 1 and

                                     t = 0.4, 1 2, 2.5, 3, 4 2,5,5.3, 6.2,6.6, 7.5,9

                                = 0                  Otherwise

This problem is aimed at helping you understand the PCA method using an idealized dataset Since you know the data you are generating it should help you understand the capability of the method.

a. Perform a principal component analysis on the dataset you have generated.

b. What is the total variability in the dataset?

c. What is the percent of the total variability explained by the first three components?

d. How many components should be retained?

e. Plot the spatial representation of each of the PCs you retained.

f. Reconstruct (back transform] your original data after reducing the dimensionality of the data. Plot the scores of each of the PCs you retained

Discuss your results.

2. Using a precipitation dataset provided to you (angle \ homework\ PIV.txt), perform a PCA analysis and interpret the results. Answer the same questions as in Problem 1 The file P_124 file contains monthly precipitation in U.S. from
• January 1979 - December 2000 (264 months).
• It extends from 140 W to 60 W (33 longitude points or rows) and
• 20 N to 60 N (17 latitude points or columns)
It covers the conterminous -United States. The file is read first by longitude, then by latitude and then by time.

When you are doing the PCA, remove the means for each month.

For example: Jani; - average(Jan(1979 - 2001)), so that the dominant mode will not capture the intra-annual cycle (not very interesting).

Q. 2

In case if it helps, I have converted the original precipitation data (PW.txt) to Locations - by - Time 2D data (PW_Loc_Time.txt) and added the file in the homework folder. You can use this new file to calculate the covariance and the PCAs. The figure below shows the spatial variation of the precipitation for month (T = 20). In general, the data consist of 264 (total number of months) similar spatial variations.

Matlab code for reshaping the file:

% Import data
load PW.txt -ASCII
% data size (known)
rows = 33; cols = 17; locat = rows*cols;
months = 264;
%Reshape my data
PWin = reshape(PW,locat,months);

[X,Y] = meshgrid((l:rows),(1:cols));

% which month do you want to plot?

mnt = 20;
Z = reshape(PWin(:,mnt),rows,cols);

surface(Z,'LineStyle', 'none');

Attachment:- Data.rar

Reference no: EM13923478

Boundary conditions for the finite element model

The computer program or the finite element model for one value of a and the excel file for finite element results processing;Boundary conditions for the finite element model

Recall the velocity of the falling parachutist

Question: Recall the velocity of the falling parachutist can be computed by  V(t) = gm(1-e -c/mx )/c,  Use first order error analysis to estimate the error of v at t=6. If

Prove that both results are indeed correct answers by cubing

Find the cube root of - 5, both by using the nthroot function and by rais-ing - 5 to the 1/3 power. Explain the difference in your answers. Prove that both results are indeed

Viewing the guided solutions for stormy attaway''s intro

I subscribed for a 7 day study membership trial 2 days ago. I have been viewing the Guided solutions for Stormy Attaway's Intro to programming in Matlab 2nd edition

Modeling mechanical systems with matlab

MATLAB, developed by MathWorks, is a popular software that is widely used in areas of engineering, science, education and finance. Simulink is an environment for multidoma

What is the average growth rates of the economy

What is the average growth rates of the economy along the path (kH, kL, kH kL, kH, ...) and how it compares with the average growth rate along the the balanced growth path?

Why does matlab keep telling that you need input arguments

how do you solve this problem and why does MATLAB keep telling that you need more input arguments - Create a function that returns true if the input is a numeric array and fal

Review about using audio weighting in matlab

Write a Literature review about using Audio weighting in Matlab by applying A-filter to the data. Add (graphs and imagines or charts) must also write one or two sentences to


Write a Review

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd