[SOLVED] Machine Learning   ECE 4332 / ECE 5332   Project 2

35.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon project2-4yvjd5.zip (186.8 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (1 vote)
  1. Generate the training set:
    1. 𝑁𝑁𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 = 10
    2. 𝑋𝑋𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 contains samples from a uniform distribution U(0,1).
    3. 𝑡𝑡𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 = sin2𝜋𝜋𝑋𝑋𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 + 𝜀𝜀, where 𝜀𝜀 is drawn from a Gaussian (Normal) distribution N(0, 𝜎𝜎 =0.3).
  2. Generate the test set:
    1. 𝑁𝑁𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 = 100
    2. 𝑋𝑋𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 contains samples from a uniform distribution U(0,1).
    3. 𝑡𝑡𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 = sin(2𝜋𝜋𝑋𝑋𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇) + 𝜀𝜀, where 𝜀𝜀 is drawn from a Gaussian distribution N(0, 𝜎𝜎 =0.3).
  3. Use the method of linear regression with non-linear models to fit polynomials of degree 𝑀𝑀 = 0,1,2, … ,9 to the training set.
  4. Record the training and testing errors for each of the 10 cases.
  5. Produce the plot as shown below, where

𝐸𝐸𝑅𝑅𝑅𝑅𝑅𝑅 = 𝐽𝐽𝑤𝑤/𝑁𝑁

  1. Repeat the exercise for 𝑁𝑁𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 = 100.

 

 

Upload your .m or .py file to Blackboard prior to the deadline.

 

 

  • project2-4yvjd5.zip