# Classification sigmoid function

**URL:** <https://community.deeplearning.ai/t/classification-sigmoid-function/270243>\
**Category:** Supervised ML: Regression and Classification\
**Tags:** week-module-2\
**Created:** [February 7, 2023, 4:46pm UTC](https://community.deeplearning.ai/t/classification-sigmoid-function/270243 "2023-02-07T16:46:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arya\_Gaikwad](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@Arya\_Gaikwad](https://community.deeplearning.ai/u/Arya_Gaikwad)\
**Post date:** [February 7, 2023, 4:46pm UTC](https://community.deeplearning.ai/t/classification-sigmoid-function/270243/1 "2023-02-07T16:46:02Z")

</div>

![image](https://global.discourse-cdn.com/dlai/original/3X/6/b/6b33ad483943a50e59268e34a858916e415a3934.png)  
In the course for the sigmoid function 1/1+e^-z we substitute z as z = mx+c  
But on various sites instead of substituting z direct input is fed where z=x.  
Why so?

---

<div class="post-metadata">

**Author:** ![Kic](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/kic/32/76339_2.png) [@Kic](https://community.deeplearning.ai/u/Kic)\
**Post date:** [February 7, 2023, 5:06pm UTC](https://community.deeplearning.ai/t/classification-sigmoid-function/270243/2 "2023-02-07T17:06:02Z")

</div>

Hi @Arya_Gaikwad ,

In the context of this course, z is the output of the linear transformation, as seen by the formula z = mx+c   
By applying sigmoid function to z, it would squash the values in z between 0 and 1.  
If sigmoid is applied to the input x, then it must be for other purposes.

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [February 7, 2023, 7:59pm UTC](https://community.deeplearning.ai/t/classification-sigmoid-function/270243/3 "2023-02-07T19:59:34Z")

</div>

Sometimes the bias value is included in the weight matrix, by adding a constant feature value of 1 and adding an element to the weight vector.  
Then you’d have only have `z = X * w` as the equation.
