# Asking about derivative of w\[j\] in gradient descent for logistic regression

**URL:** <https://community.deeplearning.ai/t/asking-about-derivative-of-w-j-in-gradient-descent-for-logistic-regression/205890>\
**Category:** Supervised ML: Regression and Classification\
**Tags:** week-module-3\
**Created:** [September 17, 2022, 6:31pm UTC](https://community.deeplearning.ai/t/asking-about-derivative-of-w-j-in-gradient-descent-for-logistic-regression/205890 "2022-09-17T18:31:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phan\_Phuoc](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/phan_phuoc/32/27493_2.png) [@Phan\_Phuoc](https://community.deeplearning.ai/u/Phan_Phuoc)\
**Post date:** [September 17, 2022, 6:31pm UTC](https://community.deeplearning.ai/t/asking-about-derivative-of-w-j-in-gradient-descent-for-logistic-regression/205890/1 "2022-09-17T18:31:20Z")

</div>

Hi everyone,  
I just learned about Gradient Descent for logistic regression and i’m confusing about the derivative of w[j]. Althought i knew the different between gradient descent for linear regression and logistic regression was definition of f\_wb(x), i can’t understand why there is still x[j] when we update w[j]. The definition of f\_wb(x) has been changed there so i wonder why x[j] still there

![image](https://global.discourse-cdn.com/dlai/original/3X/c/0/c0c3e97bf1db1f7fdcb4e190793112568787a4c4.png)  
i tried some math operator to prove it but i didnt get correct answer.  
I will very happy if i know the answer for this.  
Regard.

---

<div class="post-metadata">

**Author:** ![rmwkwok](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/rmwkwok/32/126977_2.png) [@rmwkwok](https://community.deeplearning.ai/u/rmwkwok)\
**Post date:** [September 18, 2022, 12:46am UTC](https://community.deeplearning.ai/t/asking-about-derivative-of-w-j-in-gradient-descent-for-logistic-regression/205890/2 "2022-09-18T00:46:58Z")

</div>

Hello @Phan_Phuoc, please check [this discussion](https://community.deeplearning.ai/t/gradient-descent-for-logistic-regression-same-partial-derivative-why/199348/5) out for some hints of deriving the formula.

Raymond

---

<div class="post-metadata">

**Author:** ![Phan\_Phuoc](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/phan_phuoc/32/27493_2.png) [@Phan\_Phuoc](https://community.deeplearning.ai/u/Phan_Phuoc)\
**Post date:** [September 18, 2022, 5:23pm UTC](https://community.deeplearning.ai/t/asking-about-derivative-of-w-j-in-gradient-descent-for-logistic-regression/205890/3 "2022-09-18T17:23:59Z")

</div>

Thank you very much. Now i has learned a new trick in calculus.
