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

  Matlab inline functions

Consider g(t)=e^(-2t) cos?(πt)(u(t)-u(t-2.5)), use Matlab inline functions for the following questions

  Determine the stability status for the digital system

Sketch the z-plane pole-zero plot and determine the stability status for the following digital system.

  Dimensional plot of the free surface charge

Include a qualitative dispersion curve sketch thatdemonstrates the operating point at which your Matlab plot applies.

  Matlab m-script that will generate a damped sinusoid

1.) Write a MATLAB m-script that will generate a damped sinusoid (frequency = 440 Hz) with a time constant of 0.25 sec. Set the time axis for 0 to 6 time constants.

  What is the difference between a script and function

Learn how to use various MATLAB built-in functions, What is the difference between a script and function? How do you create a new script or function in MATLAB

  Compute the economy sized svd

Compute the economy sized SVD of the reshaped A matrix.

  Calculate an approximation to the energy consumed

Calculate an approximation to the energy consumed over the period and calculate an approximation to the energy consumed over the period t = a to t = b.

  Compute the absolute relative errors

Check whether system has no solution, infinite number of solutions or ill-conditions. Perform this checking from the coefficient and constant matrices.

  Matlab program to compute how much money will accumulate

Write a MATLAB program to compute how much money will accumulate in 5 years in the account and in any CDs you buy. Run the program for two different savings interest rates: 4 percent and 5 percent.

  Implement newtons method in matlab

Implement the secant method in Matlab and Implement Newtons method in Matlab

  Set up a quadratic optimization problem

Set up a quadratic optimization problem that will determine the best investment mix, Solve the problem using the MATLAB quadratic optimization routine quadprog. Interpret your results.

  Calculates the required input torque and the magnitudes

Calculates the required input torque (T) and the magnitudes of the pin reaction forces (A, B, and C, along both x and y directions) for two full revolutions (0 ≤ θ ≤ 4Π) of the crank.

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