In Sigmoid Neuron, Mitesh Sir has explained about Perceptron with only 1 feature. Plotted it with salary on x-axis and Perceptron output on y-axis. But I could not figure out how y-intercept = -b/w1.

Can you please explain with equations ? It a simple one, but I cant figure out.

Hi @sushovanjena,

Can you refer these notes for a better understanding, I’m sure this will resolve your doubt.

Let me know if there’s any issue after reading these.

Hi @Ishvinder,

Its a great help from your side in solving our doubts.

But I could get the solution from notes.

For, 2-D data, equation of the model is

w1x1 +w2x2 -b = 0. So, x2 = - (w1/w2)x1 + b/w2. If we compare this with eqn of line, then y-intercept is b/w2.

Likewise, what is the equation for 1-D data and its y-intercept, that I am unable to figure out. I would appreciate if u can help.

For 1D data, x1 will be the only input.

Therefore equation would become (w1x1 - b) which can be simply compared to (mx + c)

So, now y-intercept is -b. That is my doubt as in the video and notes also, it is mentioned that y-intrrcept = -b/w1.

In the case of sigmoid neuron the function is of the form `h = 1 / (1 + e ^ - (w*x + b))`

.

If w*x + b is 0 then e ^ - (w*x + b) becomes 1, which means h = 0.5.

Now for w*x + b being 0,

**For 2D case,** say if we have two variables then we can write this equation as `w1*x1 + w2*x2 + b = 0`

Now if we re-write this 2D equation as slope-intercept format then it will be ` x2 = (- (w1 / w2)) *x1 + (-(b / w2)) where m is (- (w1 / w2)) and c is (-(b / w2)).`

**For 1D case,** say if we have only one variable then we can write this equation as `w1*x1 + b = 0`

Now if we re-write this 1D equation as slope-intercept format then it will be ` x1 = (- b / w1) where m is 0 and c is (- b / w1)`

.

Thanks for replying. But its not yet clear.

In 2D Case, we were plotting x2 against x1, so in that case x2-intercept = (-b/w2).

But in case of 1-D, as explained by sir, we plotted y(Pred. output) vs x1. So x1 is in x-axis and y(output) is on y-axis and my doubt is also in this context. According to your solution for 1-D case, x1 is y-axis, then what is on x-axis ?

Hope you got my qn.

Thanks again.

If we take x and y as the axises of 2D graph then,

**True function plot:** (X1 = input, Y = true output)

X1 is along x-axis and the Y is along y-axis.

Here X1 is 1D and Y is another 1D.

**Predicted function plot:** (X1 = input, Y_pred or perceptron(X1) = predicted output)

X1 is along x-axis and the perceptron(X1) is along y-axis.

Here X1 is 1D and Y_pred or perceptron(X1) is another 1D.

Sorry, but I hope this would help you in clearing the doubt.

Thanks for replying. And plz dont say sorry, we are just trying to figure out the solution.

In your previous reply, you mentioned the 1-D eqn as w1*x1 + b =0 and the slope-intercept format as x1=(-b/w1). But sorry to say, I dont think this is in slope-intercept format . In that format, variable in y-axis is expressed in terms of the variable in x-axis. Here, in 1-D case, y_pred is in y-axis and x1 is in x-axis.

So, Can you plz tell me the equation in terms of y_pred and x1 for 1-D Case, in slope-intercept format ?