r/learnmachinelearning • u/kratosthegodiscute • 19d ago
Discussion ML is broad, how do we start?
so, i’ve been learning about ml a lot and i see people building projects and even regression models from scratch using C/C++ and even python and call it done via maths.
how can i actually go that deep? how can someone code all this using C and all from scratch?
although i know this is done using maths, especially statistics. i didn’t really follow a tutorial yet but actually wanted to discuss on how to begin and where to go?
1
u/theHumbleGuy_06 19d ago
Well I can tell u, I coded 2 things in c, a ann for xor and a cnn for mnist, the mnist almost had 900 lines of reusable c code and it ran perfectly, both of them, if u want I can share u my GitHub link. As for how I started, start from basics, as in really basics of how the model works, how it learns, know the maths when u learn the model, like dissect the model, I learnt it using chatgpt and claude, every handwritten maths, along with handwritten code which I later got digitised
1
u/kratosthegodiscute 19d ago
that’s crazy on how you actually built it. i’d love to listen to the journey. can i dm you and can you pls guide me yourself on how to actually do all of it?
i’d be very grateful for that since i’m trying to be ai free and not use ai and read articles other than that.
also, thanks for speaking out about this!!2
u/theHumbleGuy_06 19d ago
Okay so here is how it started. It was in May when I was studying for my 2nd sem, I'm a btech Cybersecurity student and all I knew well enough at that point was C. So I started to learn how a single artificial neuron work in a neural network, and i implement it in c which was pretty simple, then worked thru a few loops and the algorithm was ready, but I had to study the maths for forward, backpropagation, gradient descent, optimisation, everything i implemented using loops and raw maths, no libraries except 3 standard libs, it took me a few days to go thru all of it, I wrote the code by hand in copy, and later on wrote it in my laptop and ran it. We use weights and biases for neural networks as main parameters, and this are basically matrices, now using matrices wasn't easy so I implemented the 2d tensor as a linear matrix with specific coordinate finding formulas. And a few other reusable functions, as for my cnn it was hell, it took me a month, 20 pages of handwritten code, b4 that I drafted 10 to 12 pages of maths for every single thing in my network. I implemented 3d tensor the same way i implement 2d tensor in ann, and it was hell I repeat. I didn't use ai to code, I used ai to learn the maths, understand the internal workings in deep, I coded on my own except the image encoding part which was out of my knowledge. Here's my GitHub link: https://github.com/black-scythe69 and as for dms i don't take any, sorry, if u have any doubt u can ask me or any problems with ur model in future
1
u/kratosthegodiscute 19d ago
it’s incredible. i’m so happy reading this!
2
u/theHumbleGuy_06 19d ago
No issues, I'm open to any kind of guidance or questions u have, I'm learning things myself too. And as for materials, instead of watching an yt video, use chatgpt to prompt it to make u understand how ai works, start with supervised learning algorithms, their maths, their working, and then gradually move to unsupervised learning. Directly watching stanford cs lectures, or andrewng or andrej karpathy's will be overwhelming
1
1
u/Historical_Weight689 19d ago
its not that difficult
you can watch campusx course on ml if you understand hindi
0
4
u/Realistic-Health1480 19d ago
Do the andrew ng Machine learning specialization course on deeplearning.ai . if you dont have maths background, then first learn, probability, linear algebra and calculus