Question: Question 1 1 pts Calculate the centroid ( in ) of the section below from the top Problem 2 . [ 7 5 points ]
Question
pts
Calculate the centroid in of the section below from the top
Problem points Consider a linear model vec The input vec is dimensional, the weight vec is of same dimension, and the output yinR is a scalar. We will optimize the weights vec in a linear model such that it can classify two types of datasets: the first data type has low frequency and the second data type has high frequency. Specifically, they are sinusoidal waves with frequencies Hz low and Hz high Random numbers are added to make them noisy. Given the low frequency data as the input the output of the linear model should be On the other hand, given the high frequency data as the input the output should be
Here is the Python code that generates two types of datasets.Answer the following questions.
pts Plot several example data from each data type.
pts Set up a loss function, measuring the difference between predicted and true data types. Set up a gradient descent algorithm that reduces the loss function. Use the reverse mode of automatic differentiation when computing the gradient of the loss with respect to vec
pts Show that the loss decreases as the training progresses.
pts Once the loss becomes small, use the optimized vec to predict the data type. Compare the predicted and the true data types and show that the prediction is accurate.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
