Question

The value of a weight vector is given as (w1=3, w2=-2, w0=1) for a linear model...

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 vector x result in f(x)=0.5. Plot the decision boundary in two dimensions.

Homework Answers

Answer #1

SOLUTION:

1.

We consider a linear sample between -5 to 5 consisting of 100 hunderd sample sample to plot the sigmoid function and its decision boundary.

In python, a sigmoid function can be written as

def sigmoid(z):return 1/(1 + np.exp(-z))

we plot the sigmoid function and decision boundary with the following code:

import matplotlib.pyplot as plt

import numpy as np

x_sample = np.linspace(-5,5,100)

plt.plot(x_sample, sigmoid(x_sample))
plt.plot([-5,5],[.5,.5])

plt.xlabel("z")
plt.ylabel("sigmoid(z)")

plt.show()

The 2D graph of sigmoid function and decision boundary look like:

please give me thumb up

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
A linear time invariant system has an impulse response given by ℎ[?] = 2(−0.5) ? ?[?]...
A linear time invariant system has an impulse response given by ℎ[?] = 2(−0.5) ? ?[?] − 3(0.5) 2? ?[?] where u[n] is the unit step function. a) Find the z-domain transfer function ?(?). b) Draw pole-zero plot of the system and indicate the region of convergence. c) Is the system stable? Explain. d) Is the system causal? Explain. e) Find the unit step response ?[?] of the system, that is, the response to the unit step input. f) Provide...
II. You are given the following linear regression model, where ??2 represents a qualitative variable with...
II. You are given the following linear regression model, where ??2 represents a qualitative variable with two outcomes {0,1} and ??1 is a quantitative variable: ?? = ?0 + ?1??1 + ?2??2 + ?i 1. The response function for Y using ??2 = 0 is: (5pts) 2. The response function for Y using ??2 = 1 is: (5pts) 3. Explain theoretically what does a) ?1 indicates. (10pts) b) ?0 indicates (10pts) c) ?2 indicates (10pts)
1. Given β = XT 1×nAn×nXn×1, show that the gradient of β with respect to X...
1. Given β = XT 1×nAn×nXn×1, show that the gradient of β with respect to X has the following form: ∇β = X T (A + A T ). Also, simplify the above result when A is symmetric. (Hint: β can be written as Pn j=1 Pn i=1 aijxixj ). 2. In this problem, we consider a probabilistic view of linear regression y (i) = θ T x (i)+ (i) , i = 1, . . . , n, which...
Assume that we are working with an aluminum alloy (k = 180 W/moC) triangular fin with...
Assume that we are working with an aluminum alloy (k = 180 W/moC) triangular fin with a length, L = 5 cm, base thickness, b = 1 cm, a very large width, w = 1 m. The base of the fin is maintained at a temperature of T0 = 200oC (at the left boundary node). The fin is losing heat to the surrounding air/medium at T? = 25oC with a heat transfer coefficient of h = 15 W/m2oC. Using the...
Question 3 (a) [10 marks] FAEN102 students must attend t hours, where t ∈ [0,H], of...
Question 3 (a) [10 marks] FAEN102 students must attend t hours, where t ∈ [0,H], of lectures and pass two quizzes to be in good standing for the end of semester examination. The number of students who attended between t1 and t2 hours of lectures is de- scribed by the integral ? t2 20t2 dt, 0≤t1 <t2 ≤H. t1 As a result of COVID-19, some students attended less than H2 hours of lectures before the university was closed down and...
Given the data 28.65 26.55 26.65 27.65 27.35 28.35 26.85 28.65 29.65 27.85 27.05 28.25 28.85...
Given the data 28.65 26.55 26.65 27.65 27.35 28.35 26.85 28.65 29.65 27.85 27.05 28.25 28.85 26.75 27.65 28.45 28.65 28.45 31.65 26.35 27.75 29.25 27.65 28.65 27.65 28.55 27.65 27.25 Determine (a) the mean, (b) the standard deviation, (c) the variance, (d) the coefficient of variation, and (e) the 90% confidence interval for the mean. (f) Construct a histogram. Use a range from 26 to 32 with increments of 0.5. (g) Assuming that the distribution Thus, the improved estimates...
Questions 1 through 6 work with the length of the sidereal year vs. distance from the...
Questions 1 through 6 work with the length of the sidereal year vs. distance from the sun. The table of data is shown below. Planet Distance from Sun (in millions of miles) Years (as a fraction of Earth years) ln(Dist) ln(Year) Mercury 36.19 0.2410 3.5889 -1.4229 Venus 67.63 0.6156 4.2140 -0.4851 Earth 93.50 1.0007 4.5380 0.0007 Mars 142.46 1.8821 4.9591 0.6324 Jupiter 486.46 11.8704 6.1871 2.4741 Saturn 893.38 29.4580 6.7950 3.3830 Uranus 1,794.37 84.0100 7.4924 4.4309 Neptune 2,815.19 164.7800 7.9428...
In this exercise, you will analyze the supply-demand equilibrium of a city under some special simplifying...
In this exercise, you will analyze the supply-demand equilibrium of a city under some special simplifying assumptions about land use. The assumptions are: (i) all dwellings must contain exactly 1,500 square feet of floor space, regardless of location, and (ii) apartment complexes must contain exactly 15,000 square feet of floor space per square block of land area. These land-use restrictions, which are imposed by a zoning authority, mean that dwelling sizes and building heights do not vary with distance to...
Item 1 In the case below, the original source material is given along with a sample...
Item 1 In the case below, the original source material is given along with a sample of student work. Determine the type of plagiarism by clicking the appropriate radio button. Original Source Material Student Version Major changes within organizations are usually initiated by those who are in power. Such decision-makers sponsor the change and then appoint someone else - perhaps the director of training - to be responsible for implementing and managing change. Whether the appointed change agent is in...
Part I. Indicate whether true or false (T or F). ____ Storm water detention ponds typically...
Part I. Indicate whether true or false (T or F). ____ Storm water detention ponds typically are designed to regulate the outflow peak rate at or below a single target value, such as the pre-development (pre-land use change) peak runoff rate for a specified return period event. Detention storage alters the peak but not the volume of the outflow hydrograph. _____ Typical rating curves for weirs are concave upward. Typical rating curves for orifices are concave downward. ____ A sediment...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT