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)

where

• 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

Questions Cloud

Summary of key details about the organizations : In addition to searching for the specific organization name "and best practices" or "best HRM practices," you might find it helpful to search for the specific organization name "and recruitment." "Specific organization name and training & developm..
Mathematical formula explained the fat content and protein : Gather three of your favorite packaged foods; perhaps one from each: breakfast, lunch and dinner. Use the model explained in the "Are You Sure It's Fat Free?" to analyze, through the mathematical formula explained the fat content and protein conte..
Compare the size of the potential payoff and risk involved : At what stock price level will the person who sells you the Breener call option break even? Compare and contrast the size of the potential payoff and the risk involved in each of these alternatives.
Information regarding selling prices and costs : In this case, you are provided information regarding selling prices and costs of several products offered by Mendel Paper Company. In addition, management has concerns about sales mix and rising costs. Address the questions (1-5) at the end of th..
Perform a principal component analysis on the dataset : Perform a principal component analysis on the dataset you have generated - what is the total variability in the dataset and what is the percent of the total variability explained by the first three components?
Calculate the expiration date payoffs and profits : Using the same potential stock prices as in Part a, calculate the expiration date payoffs and profits (net of the initial purchase price) for the following positions: (1) buy one XYZ put option, and (2) short one XYZ put option.
Advantages and disadvantages of the devil advocate : Using the materials in the text, what are the advantages and disadvantages of the devil's advocate, dialectical inquiry, and consensus approaches to making strategic choices
Problem regarding the quasi-experimental designs : 1. Jackson (2012), even-numbered chapter exercises, p 360. 2. Describe the advantages and disadvantages of quasi-experiments? What is the fundamental weakness of a quasi-experimental design? Why is it a weakness? Does its weakness always matter?
Negative managerial scenario that the regional manager : Exercise 1-9) Zoya Arbiser, regional manager of Gold Medal Sports Shops, is reviewing the results of 15 stores in her region. Store managers are moved annually. Each store manager's income is very dependent on the direct contribution margin of t..

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Use matlab roots function to obtain the six roots

In the plot, you will see one root is obtained from an initial value that is close to another root. Can you explain by observing the plot why that is happening.

  Write a function that takes a list of integers

Using ML write a function that takes a list of integers as argument and returns a pair consisting of the sum of the even position and the sum of the odd positions of the list.

  Estimation of the rayleigh limit experimentally

Propose a method that would allow estimation of the Rayleigh limit experimentally. By using Matlab implementation of your method, prove (or disprove) that the theoretically derived equation is correct for a rectangular window.

  Write the matlab code for nested for loops

write the MATLAB code for 3 nested for loops. Use the same variable naming scheme as above, and have the following number of iterations

  Write a program to compute a

Write a program to compute A. Test it with P = $55,000 and interest rate of 6.6% (i = 0.066). Compute results for n = 1, 2, 3, 4, and 5 and display the results as a table with headings and columns for n and A

  Generate a sphere of diameter 3. create 3 vectors

Generate a sphere of diameter 3. Create 3 vectors representing the translation of this sphere along the x, y, and z axes. Generate the correct vectors given the description below: The sphere should be translated to (-10, -10, -10).

  Role of signal processing in an engineering application

What could the contaminant/toxicant/pollutant be and where could the contaminant have likely come from -  explain how all the information provided in the case study backs up your Diagnosis.

  Let''s combine everything together

Let's combine everything together! In this question, you will be asked to combine scaling and translations. Write a function named "problem5" that accepts a single input and scales the image by 0.5 and shifts it up by 7 units. The input variable h..

  Approximate the solution to the above initial value problem

dydt te3t - 2y 0 le t le 1 y0 0approximate the solution to the above initial value problem usinga modified-euler

  Approximate the solution to the above initial value problem

1. dydt te3t - 2y 0 le t le 1 y0 0approximate the solution to the above initial value problem usinga modified-euler

  Anatomy of a machine

Need a Machine Learning application written in matlab to be able to predict, based on certain selected features of wine, which variants of wine are likely to score above a 5 out of 10 quality score.

  Create a matlab program

Create a MATLAB program that will use MATLAB's fzero function to determine d for the following parameters: R = 0.5 m and in steps of 0.1. Create a table consisting of S and d .

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