1
$\begingroup$

let's say that I need to calculate the following expression:

$$ \frac{\partial\mathrm{log}(\mathrm{exp}(w_1 * x_1 + b_1) + \mathrm{exp}(w_2 * x_2 + b_2))}{\partial w_1} $$

How do I start? The rules that I know about derivation, exponential and logarithm are not very useful in this situation.

$\endgroup$

1 Answer 1

7
$\begingroup$

This is just an application of the chain rule

$$ \frac{\partial\mathrm{log}(\mathrm{exp}(w_1 * x_1 + b_1) + \mathrm{exp}(w_2 * x_2 + b_2))}{\partial w_1} = \frac{\partial}{\partial w_1}(log(f(w_1)) = \frac{\frac{\partial f(w_1)}{\partial w_1}}{f(w_1)} $$

So your final answer is:

$$ \frac{x_1\mathrm{exp}(w_1x_1+b_1)}{\mathrm{exp}(w_1 * x_1 + b_1) + \mathrm{exp}(w_2 * x_2 + b_2))}$$

$\endgroup$
2
  • $\begingroup$ in $log(f(w))$ do you actually mean $log(f(w_1))$ ? $\endgroup$
    – fstab
    Oct 5, 2014 at 16:28
  • 1
    $\begingroup$ @francesco - yes, my mistake, I'll fix that. $\endgroup$
    – Eweler
    Oct 5, 2014 at 16:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.