Question: Problem 3: Load the data from TimeSeries.xlsx into a numpy array, say numdat, and perform the following analysis: a. Assign first 150 samples of the

Problem 3: 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 (3k+1)** (k 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 (.e. 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 (.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. Problem 3: 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 (3k+1)** (k 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 (.e. 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 (.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
Get step-by-step solutions from verified subject matter experts
