본문 바로가기

Coursera/Mathematics for ML and Data Science

Calculus for Machine Learning and Data Science (7)

728x90

Gradients and Gradient Descent

Quiz

Q1

Given that $f(x,y) = x^2y+3x^2$, find its derivative with respect to $x$, i.e. find ${\partial f\over \partial x}$

Answer

더보기

$2xy+6x$

Q2

Given that $f(x,y)=xy^2+2x+3y$, its gradient, i.e. $\nabla f(x,y)$ is:

  1. $\left[\begin{array}{c} 2xy+3\\ y^2+2 \end{array}\right]$
  2. $\left[\begin{array}{c} 2xy\\ 2x+3 \end{array}\right]$
  3. $\left[\begin{array}{c} y^2+2\\ 2xy+3 \end{array}\right]$
  4. $\left[\begin{array}{c} 2y\\ 0 \end{array}\right]$

Answer

더보기

3

Correct! Applying the gradient's formula: $\nabla f(x,y) = \left[\begin{array}{c} {\partial f\over \partial x}\\ {\partial f\over \partial y} \end{array}\right]$, you can get the result!

Q3

Let $f(x,y)=x^2+2y^2+8y$. The minimum value of $f$ is:

Hint: The question asks for the minimum value that the function can output, and not the point (x, y) that gives it.

Answer

더보기

-8

You are correct! Finding the $x$ and $y$ values that satisfies $\nabla f(x,y) = ( {\partial f\over \partial x}, {\partial f\over \partial y}) = (0,0)$ and then applying them to $f(x,y)$ gives you the correct result!

Q4

The gradient of $f(x,y,z)=x^2+2xyz+z^2$ is:

  1. $\left[\begin{array}{c} 2x+2yz\\ 2xz\\ 2xy+2z \end{array}\right]$
  2. $\left[\begin{array}{c} 2x+2xz\\ 2yz\\ 2xy+z \end{array}\right]$
  3. $\left[\begin{array}{c} 2x+2yz\\ 2xy\\ 2xy+z \end{array}\right]$
  4. $\left[\begin{array}{c} 2yz+2xz\\ 2z\\ 2x \end{array}\right]$

Answer

All the information provided is based on the Calculus for Machine Learning and Data Science |  Coursera from DeepLearning.AI

728x90