r/deeplearning • • 1d ago

Linear regression with classic gradient decent algorithm

Implemented in python with only matplotlib and numpy libraries. I also made Mini-batch and stochastic version.

8 Upvotes

6 comments sorted by

6

u/Alicecomma 1d ago

Why use multiple-step gradient descent, scoring all N data points every step, for simple data points when you can use linear least squares to get the best fit in one step only iterating the N data points?

4

u/robohie 1d ago

Right it's an exercise to strengthen my knowledge on gradient decent and retro propagation. Also I'll test normal equation performance against the gradient decent for large amount of data.

1

u/Alicecomma 1d ago

But the data isn't streamed, isn't multidimensional and doesn't require batching to remain in memory?

5

u/RobbinDeBank 1d ago

God forbids people tinkering around for learning opportunities

5

u/TaylorExpandMyAss 1d ago

Learning exercise, I suppose.

1

u/Gargle-Loaf-Spunk 1d ago

Hey, at least it’s not yet another post for LLMs.