The 1st day of my 100 days of code challenge
Tags: machinelearning, ai, 100daysofcode, datascience
Published: 2023-05-15 21:04:46

Recently, after a long break from coding (2 years), I've decided to hop back in the game and do what I did then and proved to work wonders for me, the 100 days of code challenge.

However, back then, it was just about learning Python. Today, it's about making sure I'm up-to-date with the latest technologies and learn what would end up proving to be worthwhile. Coming into this, I envisioned the site I would want to be able to create at the end of this. Something that would be an SPA, used Flask as its backend (after having done some research on whether it'd be smart to stick to Flask), React to make it an SPA and Machine Learning to have some cool functionality one couldn't explicitly code. For now, that project is a site which is kind of like a social network for readers. Where readers will be able to follow each other, and get recommendations based on the books they've read (which is where Machine Learning will come in handy). 

Now that the goal is clear, here's the execution.

I haven't thought about React or anything of the sort as I believe that to be the easier part, the dessert of the process. What came across to me as truly difficult and is very much proving to be incredibly difficult is Machine Learning, that's where my focus will be going to during these next few weeks. To become proficient in the ML field, I set out to finish Andrew Ng's course on Coursera within, hopefully, two months. Following ChatGPT's recommendation, I will start with said project upon completing the first 8 weeks of his course.


Today, was the first day. I put in about 4.5 hours into the course. I finished the first week, but so many doubts are rising in my head regarding the Gradient Descent algorithm. The basic terminology that I find incredibly easy to understand but also pretty hard to remember doesn't come all that naturally yet, for example, I understand what linear regression means, I just wouldn't be able to explain to you what it means. This is to be expected, and I hope that all these terms will become natural over time. The doubts are because for the life of me, I couldn't understand how the gradient in points w and b look. I couldn't understand how _both_ of the points adapt to make the cost function they construct together be closer and closer to the minimum point of what I imagine to be a function of all possible cost functions with all the different W and B parameters just by using that equation Andrew introduces. I assume, and very much assume, that it's because of my lack of understanding of what a partial derivative is. And they say we don't need math. As someone who isn't all that good in Calculus and is still in high school, I don't know what to expect. Tomorrow, I'll try to catch up on it and see if it makes it any better for me, I just couldn't visualize it at all in my head and I didn't find any resource that did, which _probably_ means it's easier to understand when you understand the concept of partial derivatives.

When I tried to watch videos on the subject on YouTube, they use super complicated terms and mathematical terms that push me away. But I won't let this get me down, I'll stick to Andrew and keep telling myself that I can do this.

I even tried to make a document summarizing it using intuition and I assume it didn't go all that well, but here it is.

[The Gradient Descent Algorithm: One-variable Linear Regressions](https://docs.google.com/document/d/11buldrWT_tABY2eKj0W8T0kQGUV2YSXpXumxWxJcZk8/edit?usp=sharing)

_What ChatGPT had to say:_
Overall, the explanation provides a general overview of the gradient descent algorithm for one-variable linear regressions. However, it could benefit from further clarity and expansion to address potential questions that might arise from readers, such as the calculation of the gradient, the specific update rule, or the convergence criteria. Adding more details and examples could enhance the comprehensibility and depth of the explanation.

About that, it is very much right! Those are the questions that rise in my head. How do the graphs of both of the parameters look? What's their ideal value? As I'm writing this, things come together. Which is why I'm taking all of the frustration I had in this article, I hope that these will get shorter as time goes on.

I also got the book "Atomic Habits" which we all already know, and I'm taking a "two birds with one stone" approach - I read it out loud to help increase my confidence in speaking out loud in English, as I tend to stutter a lot. So far, I love the graph visual James provided comparing the decline resulting from becoming 1% worse everyday with the rise resulting from becoming 1% better everyday. Only read 20 pages, was super exhausted. It's 11pm as I'm writing this. Wishing everyone a good night!
I'll keep posting all of the details of my journey during these 100 days.