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

  Plot the angular velocity of the pendulum

Plot the angle of the pendulum as calculated from all three ODE solver methods on a single plot, ensuring that the plot is titled, all axes are labelled, units are indicated, and the legend for each solver displayed in Best configuration.

  Prepare a matlab code for triangulation

Prepare a matlab code for triangulation

  Write a matlab program that produces the sum of square

Write a Matlab program that produces the sum of square of all the even numbers and cube of all the odd numbers between 1 to 100.

  Find the potential energy stored in each spring

The potential energy stored in a spring is kx2/2, where k is the spring constant and x is the compression in the spring. The force required to compress the spring is kx. The following table gives the data for five springs:

  Find command to list the eligible ages

What is the command to change a numeric type into a character (or string) type? double(num) - find command to list the eligible ages

  Write a matlab m-code which solve finite difference equation

Write a Matlab M-code program which solves the Finite Difference equations for the unknown temperatures Ti where the value of N, the number of internal nodes in the vertical direction.

  Matlab – discrete time simulation

MATLAB – Discrete time simulation, solve  Discrete time syetm problem,  DT kalman filter problem,  Steady state DT kalman filter problem

  Random number generator to create a symmetric matrix

Use a random number generator to create a symmetric matrix - without using built-in MATLAB commands, using the Power Method in combination with the Method of Deflation, obtain the eigen values & eigenvectors of the matrix

  Matlab program that ?nds one root of a polynomial equation

Write a MATLAB program that ?nds one root of a polynomial equation using the Bisection method. A script ?le in MATLAB is a ?le that contains a sequence of MATLAB statements.

  Calculate the geometric mean of numbers

Write a program to calculate the geometric mean of numbers entered by a user. The program should prompt the user to enter numbers and continue to accept the numbers until the user enters 999.

  Give examples of appropriate values

Give examples of appropriate values for each of the following type expressions. Do not use the empty list as the value for any list component

  How is the actual choice of policy determined

How is the actual choice of policy determined by individual preferences? The median voter theorem, according to which the tax rate selected by the government is the one preferred by the median voter, provides a useful benchmark.

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