r/learnmachinelearning • u/UnderstandingOwn2913 • 19d ago
How deep I should understand the concept of gradient?
7
Upvotes
r/learnmachinelearning • u/UnderstandingOwn2913 • 19d ago
18
u/Leodip 19d ago
You should understand it. I don't think there is such a thing as a "shallow understanding" of gradients. What is your current understanding? What do you feel like you are missing?
2
u/Boring-Test5522 19d ago
You need to understand Calculus inside out BEFORE you attempt to explain about gradient.
If you're in US, go to community college to take some courses in Calculus / Linear Algebra / Modern Different Equation. There is no shortcut.
1
u/Ok-Library1020 19d ago
Try a tiny gradient descent demo on (w-3)^2 by hand or in a few lines of code: log w and the loss after each update, then change the learning rate. You'll see what the gradient is telling you and why step size matters way faster than from theory alone.
1
u/Prefer_Diet_Soda 16d ago
To understand gradient descent conceptually, visual explanation should be enough. To understand how and WHY gradient is calculated and used, you need multivariate calculus knowledge (typically university sophomore level calculus in the US).
0
u/SwimmerOld6155 19d ago
I don't think there's much to understand about gradients in and of themselves. Do you know calculus?
0
u/bean_217 18d ago
If you have not yet taken a calculus course, I would recommend doing so
0
u/CelebrityChess 19d ago
For ML, a useful target is being able to explain the gradient as the vector of partial derivatives, why gradient descent steps in the opposite direction, and how the chain rule links a loss back to an earlier weight. For example, for f(x,y)=x²+4y², ∇f=(2x,8y) points toward steepest increase, so a descent step goes the other way. You don’t need to hand-derive a huge network, but it helps to recognize the local derivatives that backprop multiplies together.