Question: Using python [30 points] In this problem, we will compare the performance of three different types of algorithms on a synthetic training set. All three

 Using python [30 points] In this problem, we will compare the

Using python

[30 points] In this problem, we will compare the performance of three different types of algorithms on a synthetic training set. All three algorithms will attempt to learn the a true vector w that has generated a noisy dataset. First, though, you will need to generate this dataset. Follow the steps below for the data generation: (a) Pick a weight vector wR10 whose Euclidean norm equals 1 in the following manner: i. Generate w such that each element of w is distributed standard normal, N(0,1). ii. Normalize w by w so that it's Euclidean norm is equal to 1 . Note: For reference, this is the equation for the Euclidian norm of a vector : =ii2. (b) Next, generate a training set of size m of the form {(x1,y1),,(xm,ym)} where each xiR10 is a random vector and each yi{0,1} is a label derived from a function of xi : i. To generate the xi s use the same procedure as in 1 (a)i, but do not normalize. Do this m times to produce {x1,xm} ii. For the yi s, you will generate their binary values at random using the following function: GenLABEL(xi)={10X(wxi),XUNIFORM(0,1)otherwise Where is the sigmoid function and UNIFORM(0,1) is the uniform distribution between 0 and 1 . Informally, GenLabel simply returns a 1 with probability (wxi) and a 0 otherwise

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!