# Polynomial regression | Electrical Engineering homework help

In this problem, we write a program to estimate the parameters for an unknown polynomial using the polyfit() function of the numpy package. 1

)Please plot the noisy data and the polynomial you found (in the same figure). You can use any value of m selected from 2, 3, 4, 5, 6.

2)Plot MSE versusorder m,for m = 1, 2, 3, 4, 5, 6, 7, 8respectively.Identify the best choice of m.

3)Change variable noise_scaleto 150, 200, 400, 600, 1000 respectively,re-run the algorithmand plot the polynomialswith the m found in 2). Discuss the impact of noise scale to the accuracy of the returned parameters.[You need to plot a figure like in 1) for each choice of noise_scale.]

4)Change variable number_of_samplesto 40, 30, 20, 10 respectively, re-ran the algorithm and plot the polynomialswith the m found in 2). Discuss the impact of the number of samples to the accuracy of the returned parameters.[You need to plot a figure like in 1) for each choice of number_of_samples.]

A simulateddataset will be providedas below.The polynomial used is y = 5 * x + 20 * x^2+ x^3.

Simulated data is given as follows in Python:

import matplotlib.pyplot as plt

plt.style.use(‘seaborn-whitegrid’)

import numpy as np

noise_scale = 100

number_of_samples = 50

x =  25*(np.random.rand(number_of_samples, 1) -0.8)

y = 5 * x + 20 * x**2 + 1 * x**3 + noise_scale*np.random.randn(number_of_samples, 1)

plt.plot(x,y,’ro’)

## Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
\$26
The price is based on these factors:
Number of pages
Urgency
Basic features
• Free title page and bibliography
• Unlimited revisions
• Plagiarism-free guarantee
• Money-back guarantee
On-demand options
• Writer’s samples
• Part-by-part delivery
• Overnight delivery
• Copies of used sources
Paper format
• 275 words per page
• 12 pt Arial/Times New Roman
• Double line spacing
• Any citation style (APA, MLA, Chicago/Turabian, Harvard)

# Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

### Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

### Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

### Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.