Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please solve the following question according to these rules: 1- Write the program code in Python Language 2- Share the program outputs 3- Submitted codes

Please solve the following question according to these rules: 1- Write the program code in Python Language 2- Share the program outputs 3- Submitted codes should be well-commented

4- Time Series data are below:

84,7100
84,7300
86,7000
86,3400
88,8100
88,9600
88,3300
88,4600
88,1100
88,0000
86,3800
85,4100
84,6200
83,1500
83,5900
83,2300
83,6600
83,5400
82,9600
81,8300
83,6000
81,1000
84,3700
82,4500
84,5300
84,6400
83,5000
83,7200
84,0300
83,4300
85,0600
84,8400
83,2800
83,7500
82,3100
80,7700
78,7100
78,5700
78,8700
78,1100
77,9500
78,4200
79,3200
78,2100
78,4800
78,9100
79,1600
79,0300
78,1600
77,4700
78,1700
77,7400
76,8700
76,6700
76,9300
76,3500
74,6400
76,6000
76,6500
75,0200
73,4800
72,3800
73,6200
74,2600
75,3000
76,4700
76,9300
74,8500
75,1100
75,5200
77,6400
79,6000
80,9900
80,1600
81,6100
82,2000
82,6800
80,8200
78,1800
77,5900
76,0600
76,1300
77,5000
77,4500
77,8200
75,3700
76,2200
75,6200
75,3700
76,1900
76,7700
76,6500
74,3700
75,4200
74,7100
73,5100
71,4500
71,4700
71,6500
72,3400

image text in transcribed

Load the data from "TimeSeries.xlsx" into a numpy array, say numdat, and perform the following analysis a. Assign first 150 samples of the "numdat" into a new vector called "numdat_1". b. Assign every (3x+1)* (* = 0,2*) sample into a new vector called "numdat_2". (numdat_2 provides only the values of samples no: 1,4,7...,148). TASK 1: Linear Interpolation C. By using linear and cubic spline interpolation methods of interpolate.interp1d method of Scipy package, estimate the missing sample values of numdat_2 and compare predicted time-series with original time-series (ie. compute the mean squared error (MSE) between true samples and estimated samples). TASK 2: Polynomial Regression d. By using polymonial regression methods polyfit and polyval of Numpy package, represent the characteristics of the numdat_2 time-series with a polynomial. Use fourth and fifth order polynomial regression to estimate the sample values of numdat_2 and compare predicted time-series with original time-series (i.e. compute the mean squared error (MSE) between true samples and estimated samples). (Hint: First model the given samples of numdat_2 by using polyfit method. Once you obtain a polynomial which models the data, evaluate the value of the polynomial for the all samples of numdat_1 using polyval method.) e. Compare the estimation results of TASK 1 and TASK 2. Plot original time-series numdat_1 and the estimated results of TASK 1 and TASK 2. Discuss which method performs better and why

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Object Oriented Databases Prentice Hall International Series In Computer Science

Authors: John G. Hughes

1st Edition

0136298745, 978-0136298748

More Books

Students also viewed these Databases questions