Need the math explanation 1. The value of a weight vector is given as (w1=3, w2=-2,...

70.2K

Verified Solution

Question

Advance Math

Need the math explanation

1. The value of a weight vector is given as (w1=3, w2=-2, w0=1)for a linear model with soft threshold (sigmoid) function f(x).Define a decision boundary, where the values of the feature vectorx result in f(x)=0.5. Plot the decision boundary in twodimensions.

2. Generating training samples: In two dimensional feature spacex: (x1, x2,1), generate 20 random samples, for different values of(x1,x2), that belong to two different classes C1 (1) and C2 (0).The label of each feature vector is assigned so that the samplesare linearly separable, i.e., can be separated by a linear modelwith a soft threshold (sigmoid) function. Plot the samples yougenerate in a two dimensional plane of (x1,x2). Hint: You mayconstruct an underlying linear model to cut the plane in twohalves. Then generate random samples at either side with properlabels.

3. Construct a quadratic error function using a learn model witha soft threshold (sigmoid) function for augmented feature vectorsin n+1 dimensions. Derive a gradient decent algorithm for learningthe weights. Write a program using either Matlab or Python to learnthe weights using the training samples you generate from Prob. 2.Plot the resulting decision boundary.

4. Consider a linear combination of three radial basisfunctions. Draw a network structure for the model. Write a (pseudo)algorithm for learning the parameters of the model. (You determinewhat error function to use, what training samples to use, and writeiterative equations for learning the parameters.)

Please show how you got to answer!

Answer & Explanation Solved by verified expert
4.5 Ratings (812 Votes)
1We consider a linear sample between 5 to 5 consisting of 100hunderd sample sample to plot the sigmoid function and its decisionboundaryIn python a sigmoid function can be writtenasdef sigmoidzreturn 11 npexpzwe plot the sigmoid function and decision boundary with thefollowing codeimport matplotlibpyplot as pltimport numpy as npxsample nplinspace55100pltplotxsample sigmoidxsamplepltplot5555pltxlabelzpltylabelsigmoidzpltshowThe 2D graph of sigmoid    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students